01 The underlying technology promotes the leapfrog development of games
The progress of the gaming industry is always evolving with the advancement of technology. From changes in graphics and sound effects to changes in game design and interaction methods, everything is driving the development of games. Pong, the first game developed by Atari, is recognized as the first commercially successful video game. It became an instant hit and set off the trend of video games. The 1970s was a period of rapid development of integrated circuits. In 1975, Motorola launched the 6502 processor, which laid the foundation for the subsequent glory of home computers. The most famous home computer pioneer, the Atari 2600, was born from this, and Pac-Man has since become a household name.
Modern gaming is both a comprehensive art and a complex technology. Early games were relatively simple from code logic to interface interaction, and developers were more accustomed to making them from 0 to 1. However, as functions improved, game play became more and more diverse, and technology became more and more complex, making development from scratch a slow and cumbersome process. low efficiency. In the 1990s, the emergence of CD-ROM and 3D graphics accelerator cards brought game content and screen performance to new heights, resulting in a sharp increase in the amount of code required to develop a game. Against this background, the concept of game engine emerged as the times require. born. Game developers standardize some underlying technologies and integrate them into an efficient toolset to shorten the development cycle, reduce development complexity, and support game release on different platforms and devices. It can be said that the emergence of game engines has brought great convenience to developers. These modular, universal, and standardized functions allow developers to focus more on game content and gameplay design. Today, a mature game engine may include graphics, physics, scenes and other systems.
In 1993, Id Software used the DOOM engine (Id Tech 1) to produce the game Doom, which was a great success, with sales reaching 3.5 million copies that year. Dooms success is largely due to the design of its software architecture. Its game software architecture is divided into core software components, art assets, game world and game rules. This clear architectural division enables different developers to use the same engine to create brand new game works by creating new art, levels, characters, game worlds and game rules. The successful division of the DOOM engine inspired the communitys interest in MOD production, and it also became the first commercial game engine. In the following ten years, game engines became popular, from Epic Games Unreal Engine Unreal, to CryTechs CryEngine, to Unity, which shines on the IOS side. In addition to commercial engines, many manufacturers have also created their own self-developed engines, such as Valves Source engine, Infinity Wards IW engine, and Ubisofts Anvil engine.
02 ECS architecture of Web3 game engine
At present, the two most well-known full-chain game engines, MUD and DOJO, both use the ECS architecture. ECS stands for Entity-Component-System and is an architectural pattern commonly used in Web2 game development for managing game objects (entities) and their properties (components) and behaviors (systems). The benefits of this architectural pattern are:
Performance optimization: The ECS architecture allows game developers to better manage memory layout and data access patterns, thereby improving game performance. The close arrangement of entities and components helps to reduce cache misses and improve data access efficiency.
Scalability: Due to the decoupling of entities and components, new functions only need to add corresponding components and systems without changing existing codes. This makes it easy to expand the games functionality and content.
Reusability: By dividing properties into independent components, these components can be more easily reused to create different types of entities, thus reducing redundant code.
MUD V1 is a typical 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, and they are identified by unique IDs. The Components component is the data part of the entity, which is used to describe the different attributes of the entity, such as the position of the object, the attributes of the role, and so on. By attaching different components to entities, a rich variety of game objects can be created. The Systems system handles the logic of Components and implements various rules and behaviors of the game. They exist on the chain in the form of smart contracts. Entities, components, and systems are all in a Worlds contract, and each Worlds is equivalent to an independent game environment.
How does this architecture reflect scalability? Suppose we need to upgrade a certain function in the game or the community wants to add new content, we first need to allow the new game function/logic (system) to obtain the write permission of the relevant components, and then create an upgraded version, other content in the game Just leave it as is. If you do not give write permission, then you can also consider creating new components and new systems that contain new functions. Players can choose different versions to play while interacting with the data of the same core components. Because 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 The significance of Web3 game engine to the development of blockchain games
Although blockchain technology has not yet been fully implemented in daily applications, its unique features such as transparency in rights confirmation are bound to bring important changes to the gaming field. Especially people have seen the huge magic brought by DeFi. What will happen if the game is completely uploaded to the blockchain? From DeFi, it is not difficult for us to introduce the changes that blockchain will bring to the game:
Open economic system: Blockchain can give virtual assets in games real ownership and scarcity. This means that players can verify the rarity and yield rate of items, avoiding the control and management of assets by centralized gaming companies.
Composability: Placing games 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, and even share assets, creating a more open and interoperable game ecosystem.
User-generated content: Users can build game content or assets completely independently and have ownership of the assets in an open source environment. This facilitates user-generated gameplay loops, increasing game playability and distribution. For example, users can load verified mod content into the game contract, enriching the gameplay and perhaps reaping some benefits at the same time.
Blockchain games have always been highly anticipated, especially after the two blockchain application fields of DeFi and NFT have exploded. However, there are still many obstacles to implementation:
The first is the limitation of technical infrastructure. The EVM is slow, the gas cost is high, and the Solidity language is almost incapable of processing complex game logic, which severely limits the complexity and interactivity of the game.
Economic model design, as we all know, the economic system of chain games is a top priority, and effective incentives and financialization need to find a balance.
Degree of freedom and governance: On-chain games have a very high degree of freedom or openness. It should allow any player to create and deploy different game content, but these content will inevitably lead to more complex game world, and even have unexpected economic impact, which requires an effective governance mechanism to coordinate management.
The above are just some difficulties that can be foreseen at present, and it is also the reason why almost all full-chain games focus on SLG at this stage - the game mechanism is simple, does not require high TPS, and the incomplete information required can just be perfected by existing technologies application. If we are looking forward to an MMORPG, it is undoubtedly quite challenging. Drawing lessons from the changes brought by game engines to Web2 games, if chain games also adopt the ECS architecture, it may be possible to solve:
Data organization and management: On-chain games also have a large amount of game data that needs to be processed, including character attributes, items, map information, etc. ECS architecture can help organize data into reusable components and effectively manage data modification and access.
Flexibility and scalability: By separating game entities (Entity) and components (Component), developers can easily create new game objects and functions without affecting existing logic. This flexibility and scalability is especially important in on-chain games, where complex game mechanics may require frequent upgrades and extensions.
Smart contracts and data updates: The ECS architecture can more effectively manage data updates in smart contracts. Each component can be updated independently without having to update the entire entity. This can reduce the execution cost of smart contracts and improve interaction efficiency.
Composability: One of the advantages of ECS is the composability of its components and systems, which fits with the concept of composability in on-chain games. Perhaps players can create new content that will lead to a richer experience.
04 Web3 full-chain game preview
There are still many difficulties in full-chain games, and the game engine can only solve a small part of the problems. However, challenges and opportunities coexist. The complex application of full-chain games may become a stepping stone for the real implementation of blockchain technology.
At present, the full-chain game engine is still at a very early stage. As mentioned earlier, we have seen the prototype of complex applications, but there is a lack of tools for implementation. Currently, the development progress is MUD V2 and Dojo. MUD V2 improves the ECS architecture compared to V1, but V2 is still under development. Dojo is currently the only verifiable game engine built by the Starknet community and can natively implement Fog of War thanks to the Cairo language. Dojo also adopts the ECS architecture and plans to develop L3 for exclusive games on Starknet to further improve scalability.
In addition, the infrastructure on which chain games rely is also evolving. L2 has been tamped enough to be able to release the chain with one click. Maybe a certain popular game can earn the price difference by building its own Rollup to maintain the dissipation structure and avoid the death spiral. Utilizing ERC-4337 account abstraction technology, full-chain games allow players to conduct game transactions, create characters, etc. in a single account, which helps to simplify the user experience. Different game mechanisms can also be encapsulated into an upgradeable contract account, allowing developers to easily update or optimize game rules, content, etc.