Secret Gaming: How Privacy Changes Blockchain Games
Most blockchain games are built on completely transparent blockchains, which limits the types of games and experiences that can be built. But with privacy, game designers gain tons of new options.
Read on to learn all about Secret Gaming: what it is, why privacy matters for blockchain games, and what you can build on Secret that can’t be built elsewhere.
What is Secret Gaming?
Secret Gaming includes all games that use privacy-preserving Secret Contracts for parts of their game logic. With Secret Contracts, you can choose what information to reveal when without exposing it on a public ledger.
This ability gives blockchain game designers the freedom to create the gaming experience they want and protects players from rivals using blockchain analysis to gain an edge. You can use Secret Contracts to create in-game loot, weapons, cards, and more.
Why privacy matters in blockchain gaming
Most blockchains are public by default, and you can find all data with a blockchain explorer. Now, imagine what would happen if you’d built a card game. Your card collection would be visible to all, from which knowledgeable players could derive your deck.
The blockchain would show your strategies, your character builds, favorite weapons, and moves—details your opponents can use to gain a strategic edge.
A few examples:
- In Clan vs Clan, top players and clan composition could be known—even the timezone of the clan by looking at the time-stamps of chain activity
- In PvP games, hardcore players could look up your gear and character build to optimize their strategy
- In an online poker game, opponents could check out what cards you’re holding and see if you’re actually bluffing
How customizable privacy changes gaming
On Secret, smart contracts are encrypted by default; Input, output, and the network state can’t be read on the ledger. But you can choose to share details with viewing keys—something we call customizable privacy.
This feature protects player data and makes winning a matter of gaming skills again, and gives game designers the freedom to design the game they want.
Let’s take the example of a card game. The game can be designed to reveal your name and level while your deck remains private. You can choose to reveal cards to your opponent, depending on your strategy—but no earlier.
Blockchain game designers can decide what information is shown at what stage in the game. You can carefully plant information for players to find or use and craft the experience you want. You can create loot boxes or hidden features that reveal themselves based on the player’s experience, number of victories, or any other type of event. Players (and their opponents) have no way to find out what these are, other than continuing to play the game.
How Secret Gaming works
Secret Gaming uses Secret Contracts—smart contracts with encrypted input, output, and state by default. Secret Contracts can be used to hide and reveal data selectively. Viewing keys can be used by game designers and players to reveal data to whoever they want.
While input, output, and state might be private, the code in Secret Contracts is public. If something smells fishy, anyone can double-check the code base and make sure the gaming experience is fair.
Using Secret NFTs in Secret Gaming
Secret NFTs are an application of Secret Contracts. They differ from “traditional NFTs” (ERC-721s) in that they have private metadata and ownership fields. These can be used to hide the owner’s wallet address and gate access to full-resolution versions or hidden features.
The use of Secret Random Number Generators (RNGs)
On public chains, the seed called by a smart contract to generate a random number is visible to all and could be approximated. This visibility becomes an issue when shuffling a pile of cards during a game. Players could hop on the block explorer and guess the order of the cards with higher accuracy.
Secret solves this issue with private on-chain number generation. Because the state of the RNG contract is encrypted, the seed isn’t visible, and it’s impossible to use this to one’s advantage.
Examples of Secret Gaming in action
Secret Gaming is not a pie-in-the-sky thing. There are already blockchain games that use Secret Contacts, showing how these can be used to enhance game mechanics. Here we’ll discuss a couple of examples:
Secret Dreamscape
Secret Dreamscape is like a mashup of scrabble and poker—a game where the strength of your hand depends on the words you can create with your cards.
By default, the game is played without NFTs, and the cards are encrypted bits of data on the chain. However, if you own an “R” card—which is an NFT—the words you play will be stamped to it as private metadata.
You can use this NFT to claim a lottery prize if it contains one of the winning words. You send a viewing key that reveals these words to the lottery smart contract, which checks if any of your words match.
Secret Heroes
Secret Heroes is a blockchain-based game where you battle against others with your heroes. Each hero is a Secret NFT and has four skills with different levels. When playing, one of the four skills is chosen at random. The player with the hero that has the highest value for that skill wins.
Each hero’s name is public and viewable by one’s opponent. However, the Secret Hero’s skill levels are stored as private metadata, so only the owner knows the hero’s strength.
Order of the Mystic Skulls
The Secret Order of the Mystic Skulls is a gamified NFT project where you get to discover more about your skull’s afterlife by going through a storyline. The decisions you make unveil hidden features and can change your skull for the better or, the worse. At any time, you can sell your skull—it’s up to you to decide when is the best time to do so.
Each of the hidden features is stored as private SVG data that not even the skull’s owner can view. Hence, the owner can not know in advance what traits have yet to be revealed. Or, once alchemy begins, what traits might be created by applying the potions you discovered.
Other games running on Secret(s)
Bushi (developed by onenet) is a third-person competitive shooter that blurs the lines between traditional and web3 gaming, while also tackling the untouched world of web3 esports.
Legendao (developed by SCRT Labs) is a play-to-mint platform offering a unique gamified experience to obtain exclusive NFTs.