CaptainZ

CaptainZ

Prompt Engineer. Focusing on AI, ZKP and Onchain Game. 每周一篇严肃/深度长文。专注于AI,零知识证明,全链游戏,还有心理学。
twitter

2023 Annual Summary of On-Chain Games

Introduction to the Development of Fully On-Chain Games in 2023#

Fully on-chain games made significant progress in 2023, increasingly attracting attention. We believe there are several reasons for this:

  1. Jump Crypto clarified the connotation and extension of the concept of fully on-chain games at the beginning of the year, making a clear distinction between fully on-chain games and the GameFi sub-track of blockchain games.
  2. The emergence of ECS architecture game engines at the beginning of the year made it easier to build complex applications on-chain.
  3. The introduction of Ticking Chain resulted in a qualitative leap in the logical frame refresh rate of fully on-chain games, expanding the types of fully on-chain games from turn-based to real-time strategy games that require high refresh rates.
  4. The widespread adoption of AA wallets in 2023 greatly improved the operational experience of fully on-chain games, eliminating the need for users to sign authorization for every on-chain operation.
  5. ZK technology has rapidly developed with the popularization of ZK-Rollup, helping fully on-chain games expand from creating information-symmetric games to "asymmetric information games."
  6. The narrative of Autonomous Worlds has begun to permeate from the geek circle to the VC circle, mainly due to two significant industry events: the first being the "Autonomous Worlds Hackathon" online hackathon held in May by ETHGlobal, 0xPARC, and Lattice. The second was the "Autonomous Worlds Assembly" offline conference held in Istanbul in November.
  7. More than a dozen fully on-chain games entered the testnet phase in 2023, initially demonstrating playability.
  8. In 2023, blockchain infrastructure in Layer 2 became increasingly competitive, and application layers such as finance and social lacked sufficient innovation, making the "Crypto Native" fully on-chain game track a leader in application layer narratives.

The following sections will elaborate on several aspects, including infrastructure, narrative logic, fully on-chain games, and industry financing.

Infrastructure#

We believe that the infrastructure for fully on-chain games includes game engines, Ticking Chain, ZKP-based information hiding systems, and AA accounts.

Snip20240102_15

Game Engine#

A game engine is a software framework used for developing and creating video games. It includes many core functions needed for game development, typically encompassing rendering engines, audio processing, physics simulation, and animation systems for traditional Web2 games. By using a game engine, developers can focus on game design and creativity without having to build the entire technical infrastructure from scratch. Game engines provide game developers with a fast and efficient tool to reduce development costs and time.

Snip20240102_16

For fully on-chain games, a tool that helps developers quickly deploy game logic is equally necessary. This not only shortens the development cycle but also provides a unified data standard for subsequent iterative development and interoperability within an open ecosystem. If we consider the blockchain system as a type of distributed database, efficiently storing and retrieving game data, building large smart contracts, and synchronizing with the front-end state in a timely manner is not an easy task. The ECS architecture of fully on-chain game engines has emerged to address this.

ECS (Entity-Component-System) is essentially a way of modeling data structures, focusing on how to store and organize data.

  1. Entity: In the ECS model, an entity is an abstract concept that does not directly hold data but associates data through components. An entity can be viewed as a container for one or more components, primarily serving to provide a unique identifier for the components.
  2. Component: Components are carriers of data. In the ECS model, all data is encapsulated within components. Each component represents a specific attribute or behavior, such as position, speed, color, etc. Components contain only data and no logic or behavior.
  3. System: Systems are where data is processed. Systems determine how to handle entities based on their components. Each system has one or more specific tasks, such as rendering, physics simulation, AI logic, etc.

Snip20240102_17

This separates data (components) from behavior (systems), making data storage and processing more flexible and efficient. The advantages of this architecture include:

  • Composability: By combining different components, entities with various attributes and behaviors can be created without needing to create a large number of classes or structures.
  • Data locality: Since components contain only data, related data can be stored closely together, improving cache utilization and thus enhancing performance.
  • Reusability: Systems only care about data and not where the data comes from, allowing the same system to be reused across multiple entities.
  • Parallelism: The separation of data and behavior makes parallel processing of data in a multithreaded environment easier.

Although Jump Crypto (@jump_) also proposed a game engine architecture called ARC (Action Registry Core), we believe this architecture is merely a variant of the ECS architecture and has many limitations. Therefore, existing so-called fully on-chain game engine architectures all adopt the ECS architecture.

MUD: Lattice (@latticexyz)'s MUD is the oldest and most well-known fully on-chain game engine in the Web3 space. In its earlier first-generation version, it clearly stated that MUDv1 is a framework based on ECS. Mid-year, Lattice announced the V2 version, which made significant changes to the overall architecture of MUD. MUDv2 includes: Store (an on-chain database), World (an entry point framework providing standardized access control, upgrades, and modules), rapid development tools based on Foundry, client data storage reflecting on-chain status, and MODE (a Postgres database that can use SQL queries and reflect your on-chain status). By the end of the year, MUD introduced its own Layer 2 rollup (based on OP Stack), named Red Stone. Currently, MUD is only suitable for EVM-compatible chains.

Dojo: Currently, besides using Solidity for fully on-chain games, StarkNet's Cairo is also a commonly used language. However, MUD does not well support Cairo. Therefore, the founders of two active projects in the StarkNet ecosystem, Realms and Briq, forked MUD and jointly developed a fully on-chain engine based on Cairo called Dojo (@ohayo_dojo).

World Engine: Argus (@ArgusLabs_) designed a sharded Rollup framework specifically for fully on-chain games. World Engine consists of two key parts. The first part is the core, composed of two key elements: EVM Base Shard, a hybrid execution layer and sorter that supports sharding, and Game Shard, a high-performance game engine and execution layer. Additionally, there are peripheral components such as transaction relays and network code for client-server communication, as well as ZK Cloud provers for ZK games like Dark Forest. In simple terms, World Engine also adopts the ECS architecture, comes with an EVM-compatible Layer 2 chain, and can achieve efficient automatic "logical frame" refresh.

Keystone: Curio (@0xcurio) open-sourced Keystone in May, an L2 chain built with game Tick and ECS fully on-chain game engine. This chain is made based on OP Stack. Compared to writing ECS states through smart contracts, this design allows all ECS operations (such as queries and state settings) to have faster performance. Through custom precompiles, smart contracts can access the underlying ECS chain state. Game logic can be written in Go instead of Solidity, allowing for large-scale parallelization.

Other chains have also seen different fully on-chain game engines based on the ECS architecture, such as Obelisk (@0xObeliskLabs) based on the MOVE language and BOLT (@magicblock) based on Solana.

Ticking Chain#

Traditional games are loop-based, as their core operating mechanism is the game loop. The game loop is a continuously repeating process that typically includes handling user input, updating game state, and rendering the game world. This loop continues during the game's runtime, usually running dozens to hundreds of times per second to maintain the fluidity of the game world. In this architecture, game systems (such as physics engines, AI systems, etc.) check and process the game entities and components they care about in each loop.

However, the architecture of blockchain is push-based. A blockchain is a distributed database that shares and stores information through nodes in the network. When a node generates a new transaction (such as a transfer, contract call, etc.), this transaction is pushed to the network, and other nodes validate it and add it to the blockchain. This is a passive process; nodes do not actively seek new transactions but wait for other nodes in the network to send new transactions. Therefore, the architecture of blockchain is referred to as push-based.

In traditional Web2 games, the execution of the game loop function is also called a "logical frame," which can be integrated into the game backend server or set up as a separate "heartbeat server." In fully on-chain games, the synchronization of logical frames is generally conducted through "lazy updates" and "manual ticking" to achieve an active game loop. The downside of this approach is that the refresh rate of logical frames is relatively low, resulting in higher gas fees. @therealbytes achieved efficient, automated logical frame synchronization by precompiling the loop function into chain nodes.

Representatives of this are World Engine and Keystone, which have integrated the ticking chain function into the ECS architecture, thereby increasing the synchronization refresh rate of fully on-chain game logical frames by an order of magnitude and expanding the range of themes that can be created in fully on-chain games.

AA Wallet#

Since every operation in fully on-chain games needs to be on-chain, this brings significant inconvenience to usage: it is impractical to require users to sign authorization for every transaction. The previous solution to this problem was to set up "Burner Wallets."

A Burner Wallet is a temporary wallet that is automatically generated when a user accesses the game website, with the private key stored in the local browser cache, automatically authorizing each transaction. This can only be seen as a temporary solution, as refreshing the browser cache would permanently erase the account. Moreover, it lacks sufficient security and privacy.

The emergence of AA accounts (account abstraction wallets) has completely solved this problem. Currently, there are two types of accounts on Ethereum: the first type is externally owned accounts (EOA), commonly referred to as wallet accounts, which consist of a private key and a public key, requiring users to authorize each transaction and pay gas fees. The other type is smart contract accounts, where various DApps deployed on Ethereum operate as smart contracts.

There are two routes for account abstraction: compatibility with the 4337 scheme and native account abstraction schemes. Currently, Arbitrum, Polygon, Optimism, and BNB do not natively integrate account abstraction. More support is provided through 4337-related products (such as Biconomy, Stackup, etc.), and the infrastructure is still being built; while Starknet and zkSync support native account abstraction.

AA wallets can integrate Session keys in Paymaster, allowing users to pre-approve a fully on-chain game transaction based on a set of parameters, such as a given duration, a maximum gas limit, a maximum transaction volume for a specific token, or a specific function of a specific contract, etc. This can achieve player-friendliness, allowing uninterrupted gameplay without needing to sign for every operation.

Another advancement is ERC-6551. It provides a smart contract account for all ERC-721 tokens, allowing these accounts to hold various assets such as ERC-20, ERC-721, ERC-1155, and enabling ERC-721 tokens to interact with various applications. In the realm of fully on-chain games, this allows for the simultaneous transfer of game assets and game IDs.

ZKP-Based On-Chain Information Hiding#

"Fog of War" is a common mechanism in games, with typical examples including StarCraft and Warcraft 3. This design hides information by covering certain areas of the game map, which only become visible when players explore these areas. This mechanism increases the unpredictability of the game environment, a typical feature of so-called incomplete information games. Most popular MMO games adopt incomplete information game mechanics, providing players with more space for exploration and strategy formulation.

However, in blockchain technology, data is usually completely public and transparent, making it difficult to implement incomplete information mechanisms. However, the game Dark Forest successfully created an incomplete information game environment on the blockchain by adopting zero-knowledge proof technology zkSNARKs, allowing players to publicly submit verifiable valid actions while maintaining their privacy. Thus, Dark Forest creates an incomplete information game environment on the blockchain.

However, this complex information hiding method requires customized ZK circuit programming, making widespread information hiding impossible in fully on-chain games. This is why almost all fully on-chain games in development in 2023 lack "Fog of War." The market still needs a universal ZK circuit capable of implementing "Fog of War" functionality. Several teams are attempting to solve this problem, such as Zypher Games (@Zypher_Games), which launched the zk-Game SDK, achieving high-performance, low-cost decentralized shuffling through optimized wasm and precompiled contracts. Its on-chain randomness no longer requires traditional VRF, achieving decentralization for fair shuffling and gaming. The concurrently launched zero-knowledge game engine UZKGE features a highly optimized Plonk library, a fast-scaling zero-knowledge (ZK) circuit library designed to meet the diverse needs of game developers. These circuits facilitate complex computations, ensuring the integrity of game mechanics while protecting player privacy, allowing game developers to verify critical game data without disclosing potential details.

In October, 0xPARC's @FlynnCalcutt published an article titled "ZK Hunt: an exploration into the unknown," introducing how to utilize the "Commitment" method, ZK circuits, and token penalties to achieve various on-chain information hiding, providing new ideas for creating asymmetric information fully on-chain games.

Narrative Logic#

Shanav K Mehta and Dev Bharel from Jumpy Crypto published a series of articles titled "Gaming Infrastructure" in January, proposing classifications for on-chain games, specific definitions for fully on-chain games, the benefits of creating fully on-chain games, and the ARC-based fully on-chain game engine architecture. Thus, fully on-chain games have become a deterministic track.

We now know that a simple definition is as follows:

A fully on-chain game refers to: all game logic and state (assets and others) are on-chain, implemented through smart contracts. Sometimes, we also use "on-chain game" to refer to it. In the literature on on-chain games, we often see terms like "Autonomous World" or equivalent "On-Chain Reality."

However, the term fully on-chain game is more of a technical discussion. Currently, a more popular narrative is "Autonomous World," originating from Lattice's Ludens, who wrote a short paper in 2022 to elaborate on his ideas, titled "Autonomous Worlds."

In the article, Ludens argues that an Autonomous World is a "world based on blockchain," meaning that an Autonomous World has strict narrative boundaries and formalized introduction rules, and it does not require privileged individuals to maintain its existence.

This statement describes three core characteristics of "Autonomous Worlds":

  1. Strict (Hard) narrative boundaries: This means that this world has a fixed and immutable set of baseline rules. They do not change over time or circumstances, providing stability to the world.
  2. Formalized introduction rules: This indicates that there are clear and fixed rules for entering and participating in this world. These rules include how to become part of this world and how to interact within it.
  3. No need for privileged individuals to maintain its existence: This world is self-sustaining and does not rely on any specific individuals or organizations for maintenance or management.

In the concept of Autonomous Worlds, the world is not specifically referring to a place where humans live, but rather a container, a place that accommodates rules and narratives. To be precise, the concepts of fully on-chain games and Autonomous Worlds are not completely equivalent; all Autonomous Worlds are fully on-chain games, but not all fully on-chain games are Autonomous Worlds. When fully on-chain games can expand without permissions, they become Autonomous Worlds.

In addition to the narrative of Autonomous Worlds, there is another simpler narrative to understand: fully on-chain games are essentially a form of "decentralized games." This narrative mainly mimics the terminology of decentralized finance (DeFi): since writing financial rules into smart contracts is called "DeFi," it naturally follows that writing game rules into smart contracts can be called "DeGame."

Fully On-Chain Games#

Over the past year, several fully on-chain games have entered the testing phase. Although most are still rough, they have initially completed concept validation, showing a certain degree of playability and combinability.

Sky Strife#

Sky Strife (@skystrifeHQ) is a fully on-chain real-time strategy game (RTS) built using the MUD engine. It is created by internal game designers and developers at Lattice. The gameplay of Sky Strife is similar to other real-time strategy games. For example, in a four-player map, after the game starts, the four players are located in their respective main bases at the corners of the map. The players' goal is to compete for more resources to produce soldiers and ultimately eliminate other players. The resources in the game are Gold, represented in units of g. Players can consume Gold in their main bases to produce units with varying attack power and movement speed.

Snip20240102_18

Sky Strife began a new round of public testing for Season 0 in November, utilizing a new Layer 2 scaling solution designed specifically for fully on-chain games: Redstone.

Primodium#

Primodium (@primodiumgame) is a simulation building game developed based on the MUD engine, with mechanics inspired by the famous simulation game Factorio. In Primodium, you need to design and build different automated production lines, combining conveyor belts, various factories, and natural resources on the map to create your own automated production complex, expanding your industrial empire on the planet and continuously producing increasingly complex industrial products. Game actions can be categorized into gathering, transporting, processing, building, researching, and battling. Players need to continuously gather resources, upgrade technology, build weapons, defeat other players, and ultimately dominate a region on the planet.

Snip20240102_19

Cellula#

Cellula (@cellulalifegame) is a fully on-chain artificial life simulation game. Players can explore, cultivate, evolve, and collect unique "life" forms within the game. In this game, the rules of Conway's Game of Life are regarded as the genetic code of "life," determining their form and vitality. By using the game's crafting table, players can freely create various gene sequences and give birth to their own on-chain "life." These "lives" have unique appearances and attributes, showcasing diverse life forms.

Snip20240102_20

The Ethereum block height acts as "time" in the game, with each "life" growing and evolving within the Ethereum spacetime ecosystem, similar to how aquatic organisms gradually adapt to land life and eventually become amphibians in the real world. However, the cycle of life always accompanies birth and death — when a "life" loses vitality, it will permanently die on-chain, making room for the birth of new "life."

Loot Survivor#

Loot Survivor (@LootRealms) is a text-based dungeon adventure game, created based on Starknet's Dojo, and is the first game in the Realms Autonomous World ecosystem, developed by senior members of Bibliotheca DAO, Loothero, using a unique Play2Die mechanism. The game is inspired by the background story and gameplay of the original Loot project community, where players must fight beasts, clear obstacles, collect equipment to survive, and compete for higher positions on the leaderboard.

Snip20240102_21

Dark Frontier#

Dark Frontier (@DarkFrontierGG) is a remake of the famous fully on-chain game "Dark Forest," with identical gameplay. In Dark Frontier, each player controls their own planet and must gather resources, build bases, and develop technology to enhance their combat capabilities. Players can use resources to produce buildings, conduct technological research, and manufacture weapons to gain advantages in battles. As players fly through interstellar space, they need to continuously scout and explore to discover other planets and resources. When two players simultaneously discover the same planet, they can choose to attack that planet or flee. During an attack, players must use their weapons to assault the opponent's base and seize their resources.

Snip20240102_22

The game has been remade by Argus based on World Engine, with significant improvements in UI compared to the original version, and public testing began in December.

There are also a dozen other fully on-chain games in development or at very early testing stages, such as Gabby World, Influence, Mississippi, Dope Wars, Mithraeum, Word3, PixeLAW, Shaoshin, Pirate Nation, etc., which will not be detailed here.

Industry Financing#

As a sub-track within blockchain gaming, fully on-chain games had few publicly funded projects during the concept validation phase in 2023. Below are some introductions:

  1. Game engine Argus Labs completed a $10 million seed round financing, led by Haun Ventures, with participation from Elad Gil, Balaji Srinivasan, Siqi Chen, Kevin Aluwi, Sunny Agarwal, Calvin Liu, Scott Moore, Robot Ventures, Anagram, and Dispersion Capital.
  2. Game engine Curio Research completed a $2.9 million seed round financing, led by Bain Capital Crypto, with participation from TCG Crypto, Zonff Partners, Formless Capital, Smrti Lab, Robot Ventures, and several angel investors.
  3. Game engine Paima Studios received a $1.4 million grant from Cardano, with Paima code now available on GitHub, allowing the creation of on-chain games associated with NFTs, where game states can be linked to NFTs.
  4. Proof of Play, a blockchain game startup founded by FarmVille co-founder Amitt Mahajan, completed a $33 million seed round financing, co-led by a16z and Greenoaks, with participation from Mercury, Firebase, Zynga, and Alchemy, and individual investors including Ravikant, Balaji Srinivasan, Twitch founders Justin Kan and Emmett Shear. Proof of Play aims to create fun and easy-to-use blockchain games, with its first game, a social role-playing game called "Pirate Nation," releasing a test version in December last year, where players can fight, craft, trade, and explore for the digital token marked PGLD.
  5. Fully on-chain game Citadel announced the completion of a $3.3 million seed round financing in November, led by 1kx, with participation from Shima Capital, Hashed, Matchbox DAO, Ready Player DAO, and others.

References#

https://jumpcrypto.com/writing/defining-on-chain-gaming/

https://0xparc.org/blog/autonomous-worlds

https://crypto4.wtf/p/dao

Loading...

https://therealbytes.substack.com/p/presenting-ticking-optimism

Loading...

https://0xparc.org/blog/zk-hunt

https://mirror.xyz/0x949B1fE8B1860E51fa550131EB0F21729cA68A1A/EY5l7Gcs97fcYV_YYk9JbJz5t7U_eYOdbr5TnZsRbUw

https://foresightnews.pro/article/detail/45002

https://mirror.xyz/0x8046108b92EEAa28b8970B6294BfD432dc382c7D/9CQaEwrt6JlwsbELd8EJszysLf5qD7PLP1NecvQFxFw

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.