Onchain games & their engines | Skill Tree #24
Onchain Game Engines & their ecosystems - MUD & Dojo
Definition of game engines
encapsulated code libraries and tools that perform actions such as graphics rendering, physics simulation, network communication
replace more time-consuming low-level programming
onchain game engines handle the interaction with the blockchain - managing state synchronization, efficient content maintenance in a blockchain environment, facilitating interaction with other contracts
Game Engine Architecture: ECS
ECS = Entity-Component-System Framework
modular data management system
All properties are broken down into individual compoments (e.g. health, mana)
Entities (e.g. player character) are data identifiers that link to specific components
The system manages entities and components (e.g. damage taken). That’s where the computational logic is.
pros: easier to upgrade and faster because of limited dependencies
MUD and Dojo are both examples using the ECS framework
MUD
developed by Lattice, a project under 0xParc. 0xParc was initially founded by builders from Dark Forest etc
Features: State synchronization, general purpose indexers, local tx simulation, message relaying, contract hot reloading, optimistic updates, etc.
V1
focus on 3 main issues: contract and client state synchronization, on-chain content updates, interoperability with other contracts
World contract ~= game server. each game can deploy their own
components are contracts that get registered under the world contract. Using a components updates its state under the world contract
MUD’s indexers listen to the world contract → state synchronozation
V2
MUD aims to be an engine for all onchain applications, not just games (“Ruby on Rails on EVM“)
requires a change of the ECS structure which would be constraining. Allowing other data structures as well
components → tables
components don’t deploy a new contract, they are stored in the world contract (database-like)
Ecosystem
OPCraft: onchain Minecraft
V2 brought Redstone blocks
Sky Strife: turn-based strategy game
Autonomous Game of Life: established an innovative cellular automaton template. Finalist at the Autonomous Worlds Hackathon
Netherscape: RPG with leasing directly integrated in-game as a feature. Finalist at the Autonomous Worlds Hackathon
Realm of Pepe: ARPG using payment streaming for resource distribution. Finalist at the Autonomous Worlds Hackathon
Others: Word3, Network State, Rhasccau, Muddy Frost, Museum Heist, Primodium
Dojo
introduced by onchain gaming buildesr from Loot Realms, Cartridge, and Briq
uses Cairo, not Solidity
Proof recursion: efficient verification of a proof vs providing the complete computation sequence in Solidity
Incremental proof: prove parts of an execution independetly → prove some parts client-side for privacy
Compress actions into one output vs having to provide all state inputs in ORs
Starknet eco
BibliothecaDAO (Loot Realms)
Realms: Eternum (sandboy strategy game involving construction, trading, conquest, and defense)
Loot Survivor: text-based roguelike
Cartridge (“Steam of Starknet“, providing player identity & reputation, and game publishing)
Briq (onchain lego)
Influence (space strategy sandbox MMO combining 4x, management simulation, and open-world RPG elements)
Topology: Focus on the rule/physics layer of Autonomous Worlds/on-chain realities
3 experimental projects
ISAAC (coop construction game). real-time physicals model on-chain to similate planet positions, which takes into account player actions
MuMu (algebraic digital chemics simulator)
Shoshin (strategy-based battle game where players design the mind)
Develop a modular, app-specific engine/VM
Network Effects in Web3 Game Engines
Onchain game stack
Blockchain stack (settlement layer e.g. L1/L2/L3)
Game Engine stack (libraries)
Module/prover market (plugins, e.g. VRF, account management)
Games
Trading, staking, betting etc.
we can call this the financial meta layer
Network effects come from composability and extensibility of the game and its assets. Engines built moats through open-source libraries that developers can use (app store/platform model)
Negative network effect: Congestion → app-specific rollups, sharding
Comparison of game engines
Deus Ex DAO Podcast: Onchain Gaming and Autonomous Worlds
On my podcast with Jacl, we discuss the definition of on-chain games and AWs, the current landscape, benefits and challenges, and the market potential. He shares insights from talking to builders in the industry and from his research for Delphi.