Dismantling the dark forest, the originator of the full-chain game: the application potential of ZK in the game

Original Author: Snapfingers DAO

Preface

At the EDCON conference in Montenegro, V God said that zk-SNARK will be as important as the blockchain in the next 10 years. The full-chain game Dark Forest uses the technology of zkSNARKs, and was evaluated by V God: "It's really interesting."

Dark Forest (Dark Forest) is an MMO "Cryptographic Fog of War" chain game. The fog of war is a common mechanism for gamers. Both "StarCraft" and "Warcraft 3" adopt this design, and its information hiding is realized through "fog of war" - the area on the game map will be covered , until the player finds out. This mechanism of environmental, tactical unpredictability on both sides is also known as an incomplete information game, and almost all popular MMO games are incomplete information games, which allow players to explore a richer and more dramatic strategic space.

On the blockchain, data is completely open and transparent, and an incomplete information mechanism cannot be realized. Dark Forest uses zero-knowledge proof zkSNARKs technology to allow players to publicly submit verifiable valid actions while maintaining privacy, thereby achieving incomplete information.

The following will introduce the project overview and interesting design of the full-chain game Dark Forest, and through this game, we can see how the Web3 world realizes the full-chain incomplete information game game. The article will also explain concepts such as "full chain game", "information game", "encrypted version of fog of war" and break down terminology barriers. I hope this article is helpful to those who want to know the outline of Dark Forest and explore the fun of the whole game.

** This article is for information sharing only and not investment advice, so it is not recommended to buy specific Token or NFT, please DYOR. *

01 Game Background

Dark Forest is a decentralized RTS (real-time strategy) full-chain game built on Ethereum and Gnosis (formerly known as xDai) chains. The game is an MMO space conquest game, adapted from the second novel of the same name in Liu Cixin's masterpiece Three-Body Problem series The Dark Forest. The main content of the game is to fight off other players' invaders, collect resources randomly scattered on the star map, and at the same time expand your interstellar empire as much as possible.

* MMO is the abbreviation of Massively Multiplayer Online Game, which refers to an online game in which 100 to 1000 players can participate simultaneously through the Internet.

The earliest proposer and founder of the Dark Forest idea is @Gubsheep. He happened to attend a conference on zero-knowledge proofs, and he was impressed by the dark forest theory described by Liu Cixin, so he created a zero-knowledge proof to create a The idea of a "dark forest in a crypto world". At the very beginning, this was just a very experimental and even a bit of a playful idea. After all, as a high-frequency interactive application, the game faced huge challenges in the blockchain environment at that time and even now, let alone the just When the budding zero-knowledge proof is applied to such a complex system, no one would have thought that Dark Forest not only realized this concept, but even became a milestone in the history of the blockchain.

Dismantling the dark forest, the originator of the full-chain game: the application potential of ZK in the game

Key members of the early Dark Forest team

The main members of the early Dark Forest team consisted of Gubsheep, Alan, Ivan and Moe. The team released the first beta version of the game (Dark Forest v 0.3) on the Ethereum Ropsten test network on Friday, August 7, 2020. The winner of the competition will receive a total of 1024 DAI.

02 Simple Tutorial

What do users need to prepare for playing?

  1. Official game website:

  2. Initial setting of the website

Click the lock icon, enter the website settings, and change the two settings of "Pop-ups and redirection" and "Unsafe content" from block to allow;

  • Pop-up window and redirection: the first time you log in to the game, a pop-up window will be requested to sign the transaction;

  • Unsafe content: This option needs to be enabled when using remote drawing.

Dismantling the dark forest, the originator of the full-chain game: the application potential of ZK in the game

  1. Prepare xdai

The game runs on the xDai chain, and the account is fully compatible with the Ethereum account. Each operation in the game needs to consume xDai as a gas fee. You can also use xDAI to buy planetary HATs or artifacts sold by players in the market. In each round of the official game, 0.05 xDai will be sent to the address of the verification key for the early start of the game. In the community round, xDai may not be distributed. In any case, you should prepare a ration for your account first. xDai.

There are two ways to obtain xDai:

  • Centralized exchange purchase: AscendEX

  • Cross-chain bridge exchange: for example: Li.Finance, Hop, xPollinate-V2, xDai Bridge...

  1. Prepare invitation code

Usually, before the game, the official will distribute several invitation codes to the qualified participants in the previous round by email. You can ask your friends or ask for them in the Discord of the community. But you should subscribe to the mailing list on the official website before the game, so that you also have a chance to receive the key. As for the way to obtain the key in the community round, you should pay attention to the designated community in advance.

Dismantling the dark forest, the originator of the full-chain game: the application potential of ZK in the game

03 "Foggy Forest" Mechanism

From the original real-time strategy "Dune 2", the concept of fog of war has been introduced and formally proposed. Players of Warcraft must be familiar with the battle fog system. Information such as the opponent's troops and terrain will not be displayed until the player's troops explore. These are uncertain factors in the battle scene.

After "Command and Conquer", the fog of war in the game is gradually divided into two types: the map layer and the unit layer. The terrain included in the map layer is difficult or impossible to change, and it can still be changed after the unit is removed. Guarantee the effectiveness of its intelligence, and the unit level mainly refers to the situation of the active units in the area. Since it is impossible to ensure that the other party still stays, it will be covered again after our intelligence source disappears (such as the investigation unit moves away). It is a common practice to use different levels of black to distinguish the two levels of fog. The black of the map layer is deeper, and after the map layer is opened, the remaining unit layer fog is relatively lighter. The above form of fog of war is relatively more classic and widely used. This classic mode was also inherited by most of the subsequent real-time strategy games, and later developed into RTS games and turn-based strategy games that also used the fog of war. It can be seen that this design has become an essential element in the concept of 4x games.

Dismantling the dark forest, the originator of the full-chain game: the application potential of ZK in the game

The fog of war in the dark forest is the part of the map that the player cannot see. When creating a new account, only a small portion of the starting area map is shown to the player, while the rest of the universe is covered in the fog of war. The star map will be expanded through CPU calculations, and the speed of exploration depends on the performance of the CPU. After the star map is explored, this part of the information will be continuously observed, unlike the fog of war in traditional web2 games, which will return to the fog state after the reconnaissance unit leaves, so the speed of star map exploration directly determines the The amount of information obtained. The more intelligence you have, the more precise your decisions will be.

Back to the game Dark Forest. The fog of war in Web2 games relies on the combination of field of view, terrain, exploration, weather, etc. As a Web3 chain game, zero-knowledge proof can just cleverly build a decentralized encrypted dark forest. This kind of gameplay that uses digital computing to explore the universe and broadcast enemy coordinates has never appeared in previous games.

The biggest difference between full-chain games and ordinary chain games is that all game data is on the chain. Combined with the openness and transparency of blockchain data, most so-called full-chain games are completely information-based games. Therefore, it is generally believed that it is difficult to create a full-chain MMO game with high playability using fog of war elements.

Dark Forest uses zkSNARK technology to realize the player's behavior can be accurately verified, but the state is hidden from other players. From the player's perspective, the complete state of the universe has not been fully displayed. Players can enjoy the fun of exploring maps and discovering unknown worlds on the chain. It is even possible to use the principle of the fog of war to carry out multi-line development at the same time, and to expand the planet in different areas of the star map. When other players explore you and have the ability to attack, you will not be wiped out due to too much concentration of resources, and you can regroup elsewhere.

04 Using ZK technology to realize incomplete information game

Zkp (zero-knowledge proof) can fully prove that it is the legal owner of certain rights and interests without showing specific information to the verifier. zkSNARK is one of the Zkp implementation methods. Dark Forest uses zkSNARK to realize that player's actions can be verified with precise details, but hidden from other players. Therefore, although it is a full-chain game, it has confidential information, so the dark forest can be called an incomplete information game.

Games of complete and incomplete information may sound unfamiliar, but the concept itself is simple. A game like chess or Go can be said to be a game of perfect information because from anyone's point of view, all the information on the board is available to everyone. StepN is also an all-information game. Because each player knows who owns which pair of shoes and what the characteristics of each pair of shoes are.

Dark Forest is known as the full chain game of incomplete information game. If we use familiar games to describe incomplete information games, they are games with hidden information like mahjong and poker. As far as mahjong is concerned, the opponent's hand and deck are hidden, while in poker information about the opponent's hand and deck is hidden. The innovation of Dark Forest is that it puts this incomplete information game on the chain. While sending verifiable and valid actions as public information, each player remains private.

Dismantling the dark forest, the originator of the full-chain game: the application potential of ZK in the game

Dark Forest uses zkSNARKs to hide locations on shared maps and create fog of war

Players do not need to send the conquered planet coordinates to the smart contract, they only need to claim the planet position (by hashing the planet coordinates) and a zero-knowledge proof that the hash is valid, thus ensuring the non-publicity of the planet position.

When a player makes a move, they send the hash of the planet they left and the hash of their destination, along with a zero-knowledge proof that this is a valid action.

Dismantling the dark forest, the originator of the full-chain game: the application potential of ZK in the game

Reversing the hash is difficult, so looking up the dark forest contract won't tell you where other players really are. You can only find other players by exploring the star map. When exploring the star map, because the information of the destination cannot be predicted in advance, the player's decision-making is only the optimal solution under the current situation. Whenever a new planet or artifact is discovered, the player needs to re-analyze and analyze based on all the current information. Decision-making, is it possible to attack the opponent's planet or how much is the cost of obtaining this artifact? And so on. The optimal solution is selected according to the situation at that time all the time, which is the essence of the game of incomplete information.

05 Open plug-in system improves playability

The primary purpose of Dark Forest is to allow users to have fun in a variety of ways. The competitive goal of the game is to score as many points as possible, and even if you're not a competitive player yourself, there are plenty of other ways to have fun. Plug-ins are an important part of the Dark Forest game branch. As an avant-garde game, it is also a testing ground for various functions. At present, there are 55 open source plug-ins included in the plug-in library in the official review. Mainly divided into three categories:

  • Visualization: An introduction to the game’s native interface comparison. Players can develop various functions according to their own needs, such as data visualization (heat map, small map, map export tool that can calculate the transmission time between planets, etc.), specific goals The highlight or mark of (Baotuan must-have plug-in friendly logo and highlight friends, highlight planet buff, etc.
  • Trading market: mainly for players to match the exchange of different resources, adding new game motivations to players, including but not limited to: artifact trading market, similar to equipment trading systems in other games, coordinate reward market, planet reward market, etc.
  • Automation: This kind of plug-in is usually used more frequently, mainly through scripts to help players simplify the original complex and cumbersome operations, and improve execution efficiency: resource-related (artifact capture and management two-piece set Hunt Artifacts, Artifactory, silver mine one-click Distribute Silver, Centralize Resources, etc.), battle-related (one-click capture of surrounding planets Crawl Planets, automatic repeat attack Repeat Attack, one-click coordinated attack Simultanous Attack, even Wage War that can directly launch wars against players, etc. )

Conclusion

In the dark forest, the Fi element is weakened, and more attention is paid to the gameplay, thus building a rich game experience and diverse gameplay; at the same time, it also achieves the experiment of new functions. Cheating, bribery, cooperation, automation are all allowed, except for game-breaking bugs, because you're in the "Dark Forest".

The novel game experience makes Dark Forest a dark horse in chain games, and the open guild system makes it better meet the needs of decentralization. The Snap Finger Research Institute will continue to pay attention to this full-chain game in the future.

View Original
This page may contain third-party content, which is provided for information purposes only (not representations/warranties) and should not be considered as an endorsement of its views by Gate, nor as financial or professional advice. See Disclaimer for details.
  • Reward
  • Comment
  • Share
Comment
0/400
No comments
Trade Crypto Anywhere Anytime
qrCode
Scan to download Gate app
Community
English
  • 简体中文
  • English
  • Tiếng Việt
  • 繁體中文
  • Español
  • Русский
  • Français (Afrique)
  • Português (Portugal)
  • Bahasa Indonesia
  • 日本語
  • بالعربية
  • Українська
  • Português (Brasil)