Dark Forest: Crypto-Native Gaming 🌳🎮

Cryptographic fog of war mechanics, zkSNARKs, and nested games-within-games

Table of Contents 🕹️

  1. Introduction 🐙

  2. Dark Forest 🌳

  3. The Fog of War 🌫️

  4. Meta-games 🎮

  5. Further Down the Rabbit Hole 🕳️

The universe is a dark forest. Every civilization is an armed hunter stalking through the trees like a ghost…

― Liu Cixin, The Dark Forest

This issue is sponsored by…

zkSYNC is an Ethereum scaling solution that uses zkRollup technology to create an unmatched user experience. Transaction fees are designed to be less than $0.01 per transaction and are payable in the token being transferred (so no more gas hassle). Confirmations occur near instantaneously and a withdrawal back to L1 only takes about 10 minutes. Best of all — zkRollup technology inherits the security of the mainnet without any reliance on a third party, making it one of the most secure scalability solutions available.

The best way to learn about this technology is to try it out. You can login with your wallet and check out the testnet here:

Try zkSync Now!

I. Introduction 👾

According to the Drake equation, the universe should be teeming with life—but it’s not. The disconnect between the anticipated flourishing of life in the universe and the complete lack of any signs of it is known as the Fermi paradox. While there have been many proposed solutions to the paradox, none are quite as disturbing as the answer Liu Cixin provides in the second book of the Three Body Trilogy:

“The universe is a dark forest. Every civilization is an armed hunter stalking through the trees like a ghost, gently pushing aside branches that block the path and trying to tread without sound. Even breathing is done with care. The hunter has to be careful, because everywhere in the forest are stealthy hunters like him. If he finds other life—another hunter, an angel or a demon, a delicate infant or a tottering old man, a fairy or a demigod—there’s only one thing he can do: open fire and eliminate them. In this forest, hell is other people. An eternal threat that any life that exposes its own existence will be swiftly wiped out. This is the picture of cosmic civilization. It’s the explanation for the Fermi Paradox.”

In other words, the deafening quiet we find as we look out into the universe is the same silence of a forest at night: a single sound can invite a predator, so the universe remains hushed.

This is the premise for Dark Forest, an MMO blockchain game that utilizes advanced cryptography and procedural generation to create a universe inhabited by multiple players vying for resources.

In this issue, we explore Dark Forest, hidden information games, zkSNARK cryptography, and the future of crypto-native blockchain gaming.

II. Dark Forest 👾

Dark Forest is an MMO space-conquest game where players discover and conquer planets in an infinite, procedurally-generated, cryptographically-specified universe.

In Dark Forest, players begin on a home planet with the objective to expand outwards, capturing planets and resources to increase their scores. Only a small portion of the map is revealed to the player at the onset, with the rest hidden behind a cryptographic fog of war.

Players in the most recent v0.6 iteration of the game follow a space-faring race of Seekers as they travel from universe to universe, fleeing The Ancient One—a malevolent force seeking to destroy the nomadic species. Players discover artifacts and silver that they must ferry to spacetime rips where they can extract the NFTs out of the game and into the broader xDAI ecosystem for points.

Dark Forest uses a variety of cutting-edge technologies in the game, such as zkSNARKs cryptography and OpenAI’S GPT-3 language model. Interestingly, the latter is used to distill game lore through the various ancient artifact NFTs.

The game has had tremendous success to date, even though currently it is by invitation only. The first public beta (v0.3) in August 2020 practically broke the Ropsten test network with only 300 white-listed players due to the sheer volume of transactions. This required an expansion of the game to the xDAI STAKE network for v0.4 (xDAI is an EVM-compatible proof-of-stake chain with a bridge to Ethereum mainnet), resulting in faster confirmation times and substantially cheaper transaction fees. In the most recent v0.6 round, nearly 1,900 white-listed players participated in Dark Forest and consumed over 1.7 trillion units of gas over the course of nine days.

The most recent round saw competition within the game reaching new heights, with two DAOs vying for the number one spot, forming last minute alliances with other high-ranking players to accumulate resources in a nine-day race to almost 500 million points.

While the game has relatively simple mechanics, players have begun to explore advanced strategies, culminating in a massive PvP war between two large players at the conclusion of v0.6. The war lasted 10 hours, took over 2 weeks to plan, and saw the players transporting energy from planet to planet to reduce the enemy’s defenses while reinforcing their own. PvP in Dark Forest is a chaotic dance of tactics to preserve energy at the front-lines while simultaneously deploying it into the enemy’s territory to deal critical blows to their energy infrastructure.

III. The Fog of War 👾

As discussed above, Dark Forest offers a unique cryptographic spin on the fog of war gaming mechanism.

In war, there is a lingering uncertainty about where the enemy is, what there intent is, and how you are positioned to deal with their capabilities. The phrase ‘fog of war’ attempts to capture this uncertainty.

As a video game concept, fog of war was first introduced in Empire by Walter Bright in 1977. A fog of war obscures information on the game map from the player that is only lifted when the player is in the area. It was first introduced as a way of compensating for the computer’s lack of strategic intelligence, but it has been broadly adopted by strategy games even as computer intelligence has improved since the mechanic maintains a sense of exploration and anxiety about what lies beyond the field of vision.

Fog of war is a way of expressing an incomplete information game (also known as a “hidden information game”) in game theory. Whenever a player is unaware of the full state of the game world, they are playing an incomplete information game. Examples of these games can include poker, StarCraft, and even arms control negotiations. This is different from complete information games where the capabilities of each player is known by all. The most common example of a complete information game is chess since both players know every piece’s positioning.

Blockchain gaming is inherently a complete information game. Every transaction and game state, if correctly stored on-chain, is visible. For example, in the game of CryptoKitties, anyone can see who owns what kitty and their specific traits. Dark Forest wouldn’t be as much fun if you could easily see where every player, planet, and point of interest is located at on-chain.

So how does a blockchain game which is inherently transparent implement a fog of war mechanic to create an arguably more exciting player experience? The answer is zero-knowledge cryptography—zkSNARKs.

zkSNARKs, or Zero-Knowledge Succinct Non-Interactive Argument of Knowledge, are cryptographic tools used to generate a zero-knowledge proof for any mathematical function. This allows one to prove that they have some specific mathematical fact without revealing any information about the fact at all. This is similar to how a private key signature works: you can sign a public message with a private key verifying the public address is yours without ever revealing the private key.

In the context of Dark Forest, players are required to submit zkSNARKs and a ZK proof with every move to ensure submitted hashes correspond to valid coordinates and that the move itself is legal. This is all done without ever broadcasting the actual location on-chain. The Dark Forest developers use a chess analogy to explain this: “I’m moving my knight; I’m not going to tell you where I moved my knight from, or where I moved it to, but this proof proves that it did in fact move in a legal L-shape.”

Within the game, tiles of the map are hidden by a graphical fog of war. These tiles are slowly revealed to the player as their computer’s CPU successfully solves hashes. The stronger a CPU’s hashing power, the quicker the map is revealed. This has led to players forming marketplaces where hashing power is freely traded.

zkSNARKs will likely play a major role in blockchain gaming in the future. It’s ability to conceal information while verifying truthfulness allows for fog of war mechanics in on-chain games.

IV. Meta-games 👾

Recently, the developers of Dark Forest released a crypto gaming thesis that explained how they conceive of crypto-native gaming in the web3 future. They defined a crypto-native game as one that “maximally embraces the architectural patterns and ethos of blockchain application development.” They go on to define these ‘architectural patterns and ethos’ as such:

  • The source of truth is on-chain. All meaningful data is stored on-chain making the game permissionlessly interoperable.

  • All game logic and rules are implemented and enforced by smart contracts. On-chain storage and logic extends beyond just ownership verification. All game interactions have a corresponding smart contract interaction.

  • Development is in accordance with open source culture. Contracts and the game client are all open-source. Developers are empowered to customize, fork, and otherwise mod the gameplay experience with plugins, third-party clients, smart contract extensions, and more.

  • Client-agnosticism. A litmus test of sorts: if the game is truly crypto-native then it would not matter if the developer client was removed. A ‘yes’ to this question would entail the game logic is permissionless, everything is operated via smart contract, and the game data is stored on-chain.

  • Digital assets have real world value. Blockchains are an API for value transfer. A blockchain game inherently accepts interoperability with cryptocurrencies.

These principles come with interesting emergent properties when applied to a game. For example, it would be possible to re-skin the game into something new (e.g. instead of energy moving between planets, the player could be moving gold between castles). Further, it would be possible to extend the game through supplemental clients or interoperable smart contracts.

This latter idea could lead to the development of an actual metaverse. Since smart contracts can own planets as of v0.4, interoperable smart contracts can create nested games within the game. In addition, there is a degree of physicality to traveling within the Dark Forest universe since movement takes time. This creates a temporal locality dynamic, which is necessary for a “real world” feel. Developers could create games or experiences on-chain that are accessible only by visiting these worlds, resulting in a sprawling and infinite universe of unique experiences that can be explored over time by moving between world nodes.

You can learn more about the developers’ thoughts on crypto-native gaming, zkSNARKs as a blockchain gaming tool, and the potential extensions of Dark Forest here:

The next round of Dark Forest will be coming soon. You can sign up to be whitelisted here or join their Discord where they randomly drop whitelist keys.

Playing Dark Forest is an excellent chance to try out a fully crypto-native game. And who knows—you might be experimenting with a base layer or prototype of the future metaverse.

V. Further Down the Rabbit Hole 🕳️

Accelerated Capital is a weekly publication exploring how cryptoassets, DeFi, virtual reality, and other exponential technologies are transforming our economy, society, and culture.

Be sure to subscribe to this newsletter below and follow us on Twitter.