Fully Onchain Game (FOCG) Infrastructure: FOC Game Engine

Background and importance of FOC Game Engine

The origin of FOC Game engines is driven by the basic desires when building and developing FOCG (Fully Onchain Game Engine).

Back in 2020 – 2021, when developers built and expanded Dark Forest, they faced a lot of difficulties because the toolkit and libraries were mainly for developing DeFi applications .

The FOC Game Engines were born to make building and developing FOCGs easier than before, they are a collection of code libraries and toolkits that are tightly integrated together to reduce the complexity of building and developing FOCGs.

The emergence of FOC game engines allows developers to focus on developing the core logic of the game instead of spending most of their time developing the related infrastructure.

foc game engine
Outstanding FOC Game Engines on the market

Nowadays, the FOCG market is growing very fast, more and more groups are building Engines to develop FOCGs. Basically, we can classify them into 2 main types based on their “openness” to the developer community:

  • FOC Game Engine as Public Goods.
  • FOCG Game Engine is released by a Game Studio.

The strength of Game Engines is that libraries can be modularized and added to the system. Developers can reuse and modify these modules instead of having to build everything from scratch, which saves a lot of time. The more libraries are modularized into the system, the more valuable the Engine becomes to the developer community.

In terms of the above aspects, MUD and Dojo are the 2 most prominent Engines, they have high awareness, attention from the Crypto community and a strong developer ecosystem.

MUD: Ambition to become an “operating system” to develop complex applications on EVM

MUD is launched in Q3/2022, is the pioneer FOC Game Engine in the FOCG field, specially designed for EVM and Ethereum ecosystem.

MUD is open source, anyone can use MUD for free and anyone can contribute to the project. MUD was originally built and developed by Lattice. MUD quickly developed a strong and open developer ecosystem around it.

MUD has gone through two development versions, v1 & v2. MUD V1 focuses entirely on improving the developer experience in developing FOCG, it uses the Entity Component System (ECS) structure, a specialized data structure commonly used in game building and development.

MUD v1 solved many of the difficulties in developing FOCG at that time, but it also had certain limitations, which was the driving force for the launch of v2.

MUD V2 is coming in Q1/2023, V2 improves some of V1’s issues (eg more efficient data encoding techniques to improve network state proliferation) and moves to a flexible, tabular data model similar to SQLite.

This change is intended to make MUD more accessible and useful to a wider range of developers, expanding MUD’s utility beyond FOCG to support more blockchain applications. Currently MUD v2 is still under active development, you can visit MUD Status to see the development status of MUD.

mud foam
Features of MUD

In the context of Ethereum being introduced as “the world computer”, MUD describes itself as “operating system”, along with the changes in MUD v2 showing the vision and ambition of Lattice (the company developing MUD) in developing MUD into a general framework for building complex applications on EVM without being limited to the scope of FOCG.

Dojo: From on-chain games to provable games

MUD’s birth and vision of an Autonomous Worlds (AW) inspired FOCG projects on Starknet to come together to build Dojo in February 2023.

Dojo is a FOC Game Engine focused on Starknet and its ecosystem. Similar to MUD, Dojo is also open source, anyone can use and contribute to Dojo.

Dojo’s comparative advantage stems from Starknet’s underlying technology. Starknet builds a STARK-based proving system that uses transparent setup, universal circuit support, upgradeability, and recursion. Despite the large proof size, STARK proofs are not linear in computational complexity.

In the context of FOCG, the limitations of STARK-based proving system are not a big problem, on the contrary, their strengths become Dojo’s comparative advantage when compared to other engines.

Provable Game Engine
The provable game engine

However, with the release of MUD v2, the project attempted to break away from ECS. Likewise, Dojo also began to explore its own unique path towards the Provable Games vision.

Some other prominent FOC Game Engines

Apart from MUD and Dojo, we have a few other prominent Engines developed by On-Chain Game Studios. Among them, World Engine and Keystone are non-EVM Engines and have their own development languages. Paima Engine and Archetype Engine are EVM and Solidity focused Engines .

  • Argus develops World Engine.
  • Curio develops Keystone.
  • Paima Studios develops Paima Engine.
  • Paco bytes develops Archetype Engine.

The most ambitious and prominent of these is Argus’ World Engine. World Engine is a fullstack solution for FOCG development built and developed by Argus, using a custom L2 and L3 architecture:

  • EVM Base Shard (L2): A general purpose EVM Rollup.
  • Game Shard (L3): Customized with unique functions.
world engine architecture
World Engine Architecture

Argus will develop a throughput-optimized Shared Sequencer for Shards. The EVM Base Shard and Game Shards built by Argus will use this Shared Sequencer to publish transactions to the base layer.

Currently, Argus is developing the first Game Shard based on the World Engine architecture, it is called Cardinal, a non-EVM with the development language GO. Basically, Cardinal is a mini-blockchain customized for building and developing games. It has several advantages including:

  • ECS Framework.
  • Very low blocktime (supports up to 50ms).
  • Loop-driven runtime instead of event-driven runtime, more optimal for game developers.
  • The game logic is written in Golang.
  • Compatible with game engines like Unity, Unreal Engine, etc.

In December 2023, Argus announced the release of Dark Frontier, a game inspired by Dark Forest, running on Cardinal’s devnet. Due to the heavy workload, after the end of Dark Frontier’s playthrough, the project did not have many significant updates.

Conclusion

The development of FOCGs is still in its infancy, developers often face various challenges when deploying and updating smart contracts such as interoperability between different contracts, interaction and synchronization between clients and blockchain,…

Although in the early stages of development, FOC Game Engines are also a great help to FOCG developers, helping them get rid of the infrastructure-related minutiae and focus on game development.