Preview of Full-Chain Games: The Web2 Game Engine Evolution

BeginnerNov 26, 2023
The article sorts through the development history of Web2 game engines and explores the ECS architecture of Web3 game engines. It also analyzes the significance of Web3 game engines for the development of blockchain games, and provides a forward-looking perspective on the future of Web3 full-chain games, believing that they could become an opportunity for the practical application of blockchain technology.
Preview of Full-Chain Games: The Web2 Game Engine Evolution

01 Underlying Technology Drives Leapfrog Development in Gaming

The progress in the gaming industry is always evolving alongside advancements in technology. From changes in graphics and sound to shifts in game design and interaction methods, all contribute to the development of gaming. The first game developed by Atari, Pong, is widely considered as the first commercially successful electronic game, sparking a trend in electronic gaming. The 1970s were a period of rapid development for integrated circuits. In 1975, Motorola introduced the 6502 processor, laying the groundwork for the subsequent success of home consoles. The most famous home console pioneer, Atari 2600, was born out of this, making Pac-Man a household name.

Modern gaming is an integrated art and also a complex technology. Early games were relatively simple in code logic and interface interaction. Developers were more accustomed to working from 0 to 1, but as capabilities improved, gameplay became more diverse, and technology became more complicated. Starting development from scratch became increasingly inefficient. By the 1990s, the advent of CD-ROMs and 3D graphics acceleration cards brought games to new heights in content and visual performance, leading to a dramatic increase in the amount of code required to develop a game. Against this backdrop, the concept of game engines emerged. Game developers standardized some of the underlying technologies and integrated them into an efficient toolset to shorten development cycles, reduce complexity, and support multi-platform game releases. The emergence of game engines brought great convenience to developers. These modular, generalized, and standardized features allow developers to focus more on game content and gameplay design. Nowadays, a mature game engine may include systems for graphics, physics, and scenes.

In 1993, Id Software used the DOOM engine (Id Tech 1) to create the game “Doom”, achieving tremendous success with sales reaching 3.5 million copies in the first year. The success of “Doom” was largely attributed to its software architecture design. The game software architecture was divided into core software components, art assets, game world, and game rules, among others. This clear architectural division allows different developers to use the same engine and create entirely new games by producing new art, levels, characters, game worlds, and rules. The success of the DOOM engine sparked interest in MOD production within the community and became the first commercial game engine. In the following decade, game engines became highly sought-after, from Epic Games’ Unreal Engine, to CryTech’s CryEngine, to Unity, which shines on the iOS platform. Apart from commercial engines, many manufacturers also built proprietary engines for internal use, such as Valve’s Source engine, Infinity Ward’s IW engine, and Ubisoft’s Anvil engine.

02 Web3 Game Engine’s ECS Architecture

The two most well-known blockchain game engines, MUD and DOJO, both use ECS architecture. ECS stands for Entity-Component-System. It’s a common architectural pattern in Web2 game development for managing game objects (entities), their properties (components), and behaviors (systems). The benefits of this architecture include:

  • Performance optimization: ECS architecture allows game developers to better manage memory layout and data access patterns, thus improving the performance of the game. The close arrangement of entities and components helps to reduce cache misses, improving data access efficiency.
  • Scalability: Due to the decoupling of entities and components, adding new features only requires adding corresponding components and systems, without changing existing code. This makes it easy to expand the game’s functions and content.
  • Reusability: By dividing attributes into independent components, these components can be more easily reused to create different types of entities, thereby reducing redundant code.

MUD V1 is a typical example of ECS architecture. In the framework of V1, Entities are also the basic units in the game, which can be various objects, props, or wallet addresses, identified by a unique ID. Components are the data part of entities used to describe different attributes of the entity, such as the location of objects, attributes of characters, etc. By attaching different components to entities, diverse and varied game objects can be created. Systems handle the logic of Components, implementing various game rules and behaviors. They exist on-chain in the form of smart contracts. Entities, components, systems all exist in a Worlds smart contract, each Worlds is equivalent to an independent game environment.

How does this architecture reflect scalability? Suppose we need to upgrade a feature in the game or the community wants to add new content. First, you need to give the new game function/logic (system) write access to relevant components. Then create an upgraded version; other content in the game remains unchanged. If not given write access, then you can consider creating new components and systems with new features. Players can choose different versions to play while interacting with the same core components’ data. From the perspective of Worlds, anyone can create components and systems, just like anyone can create new ERC-20 tokens and “attach” them to addresses.

03 Significance of Web3 Game Engines to Blockchain Game development

Although blockchain technology has not yet fully landed in daily applications, its unique features such as authentication rights and transparency will inevitably bring important changes to the gaming field. Especially that people have already witnessed the huge opportunity brought by DeFi. What will happen if the game is fully on-chain? From DeFi, it is not difficult to infer the changes blockchain will bring to the game:

  • Open economic system: Blockchain can make virtual assets in the game have real ownership and scarcity. This means that players can verify the rarity and output rate of items, avoiding centralized game companies’ control and management of assets.
  • Composability: Placing the game in the open environment of the blockchain allows different games and projects to complement each other. Players’ progress in one game can be reflected in other games, even sharing assets, creating a more open and interconnected gaming ecosystem.
  • User-generated content: Users can fully autonomously build game content or assets and own the assets in an open-source environment. This promotes a user-generated game loop, increasing the game’s playability and distribution. For example, users can load verified mod content into the game contract, enriching the gameplay and perhaps even earning some revenue.

Blockchain games have been highly anticipated, especially after DeFi and NFT, these two blockchain application areas have successively exploded. However, there are still many obstacles to implementation:

  • First is the limitation of technical infrastructure. EVM speed is slow, Gas fees are high, Solidity language is almost incapable of handling complex game logic, which severely limits the complexity and interactivity of the game.
  • Economic model design, as is well known, the economic system of chain games is crucial. Effective incentives and financialization need to find a balance.
  • Freedom and governance, on-chain games have quite a high degree of freedom or openness. It should allow any player to create and deploy different game content, however, this content will inevitably make the game world more complex and even produce unforeseen economic impacts, which requires effective governance mechanisms to coordinate management.

These are just some of the foreseeable difficulties and are also the reason why almost all full-chain games currently focus on SLG— the game mechanism is simple, does not require high TPS, and the information incompleteness can be perfectly applied by existing technology. If we expect an MMORPG, it is undoubtedly quite challenging. Taking reference from the changes game engines have brought to Web2 games, if chain games also adopt ECS architecture, it can possibly solve:

  • Data organization and management: On-chain games also have a lot of game data to process, including character attributes, items, map information, etc. ECS architecture can help organize the data into reusable components and effectively manage the modification and access of data.
  • Flexibility and scalability: By separating game entities and components, developers can easily create new game objects and functions without affecting existing logic. This flexibility and scalability is particularly important in on-chain games, as complex game mechanisms may require frequent upgrades and expansions.
  • Smart contracts and data updates: ECS architecture can more effectively manage data updates in smart contracts. Each component can be updated independently without updating the entire entity. This can reduce the execution cost of smart contracts and improve interaction efficiency.
  • Composability: One advantage of ECS is the composability of its components and systems, which fits well with the concept of composability in on-chain games. Perhaps players can create new content, thus bringing richer experiences.

04 Web3 Full-Chain Game Outlook

The challenges of full-chain games are still numerous, and the game engine only solves a small part of the problem. However, challenges and opportunities coexist, and full-chain games as a complex application may become the stepping stone for the real implementation of blockchain technology.

Currently, full-chain game engines are still in a very early stage. As mentioned earlier, we have seen the embryonic form of complex applications, but they lack the tools for implementation. The fastest development progress is currently MUD V2 and Dojo. MUD V2, compared to V1, has improved the ECS architecture, but V2 is still under development. Dojo is currently the only verifiable game engine built by the Starknet community, benefiting from the Cairo language, it can natively implement fog of war. Dojo also adopts the ECS architecture and plans to develop exclusive L3 games on Starknet to further improve scalability.

Additionally, the infrastructure that chain games rely on is also evolving. L2 has been so developed that you can launch a chain with one click. Perhaps a blockbuster game can sustain its dissipative structure by earning the spread through self-built Rollup, thereby avoiding a death spiral. Utilizing ERC-4337 account abstraction technology, full-chain games can allow players to conduct game transactions and create characters within a single account, which helps simplify the user experience. Different game mechanisms can also be encapsulated into an upgradeable contract account, making it easy for developers to update or optimize game rules, content, etc.

Disclaimer:

  1. This article is reproduced from [ 响指研究所], and the copyright belongs to the original author [SnapFingers DAO]. If there are objections to the reproduction, please contact the Gate Learn team, and the team will process it promptly according to relevant procedures.
  2. Disclaimer: The views and opinions expressed in this article represent only the personal views of the author and do not constitute any investment advice.
  3. Other language versions of the article are translated by the Gate Learn team. Without mentioning Gate.io, it is not permitted to copy, disseminate, or plagiarize the translated articles.
Start Now
Sign up and get a
$100
Voucher!
Create Account