Today we are talking about 👇
Dojo
What is Dojo building?
Dojo is building a provable game engine with an integrated toolchain for creating onchain games and autonomous worlds using Cairo 1.0
Dojo uses an entity component system and a diamond pattern for a modular and scalable world design.
The growth of these worlds is facilitated by the addition of Components (representing state) and Systems (representing logic)
It opens up a world of opportunities for developers in the growing onchain gaming industry.
What are Autonomous Worlds?
"Autonomous worlds represent persistent, permissionless, and decentralized open environments that users can freely interact with and contribute to."
Autonomous Worlds (AWs) are blockchain-based ecosystem that persist indefinitely and are open to unlimited expansion by developers.
They share two main features:
a decentralized data layer for state reconstruction
a permissionless entry point for world expansion.
These open, evolving platforms offer new forms of art, fun, and innovation, challenging traditional gaming concepts.
Why do they matter?
AWs matter because they operate as independent economic systems with their own currencies and markets, pushing the boundaries of gaming into new social and economic structures in the metaverse.
They represent more than just entertainment; they are gateways to revolutionary platforms in a decentralized world.
Dojo 101
Dojo, inspired by lessons learned from onchain game development, is a game engine designed to tackle inherent engineering complexities and streamline the process.
It simplifies the infrastructure, allowing developers to focus on their game's unique aspects, much like Unity does for traditional games.
Dojo incorporates Cairo and Starknet for provable games demanding zero-knowledge properties, efficiently scaling and verifying computations. By programming in Cairo, applications become provable and deployable on various platforms, including Starknet's Layer 2 and web browsers through WebAssembly (WASM).
With an ambitious vision, Dojo aims to empower developers to build onchain games and Autonomous Worlds in hours, not weeks.
Dojo Architecture & Key Features
Key Features
Entity Component System (ECS) built on Cairo 1.0
Sozo world migration planner
Torii networking and indexing stack
Katana RPC development network
Typed SDKs
We’ll talk about them below in detail.
Provable Game Engine
Dojo utilizes Entity Component System (ECS) to manage Autonomous Worlds (AWs).
In ECS, computations are systems operating on entities comprising dynamic data components.
Systems choose entities for processing through efficient queries over their components.
Understanding the ECS in Dojo
Here's a brief description of its integral parts:
Entities: Distinct objects identifiable by unique IDs that can carry multiple components.
Components: Varied characteristics of an entity, such as geometry, physics, and health points. They solely handle data storage.
Systems: Code snippets that control entities and modify components.
Queries: Leveraged by systems to pick entities based on their linked components.
World: An all-encompassing receptacle for entities, components, systems, and queries.
Building an Autonomous World with Dojo
Follow these steps to effectively create a Dojo world:
Conceptualize Entities: Visualize the entities that will populate your world.
Recognize Shared Attributes: Determine common characteristics of your entities, such as position, name, or health.
Construct Reusable Components: Create versatile components derived from these shared attributes.
Develop Specialized Systems: Design systems that are adept at performing a specific task.
Core Attributes of the ECS
→ World: The world contract operates as the primary system kernel, orchestrating all interactions and streamlining processes.
→ Authorization: In the open structure of Autonomous Worlds, enhancing a World requires appropriate authorization for secure component state interaction.
→ Components: Components define the world's structure by encapsulating state, promoting modularity and flexibility in world design.
→ Systems: Systems are functions that manage world state transitions, utilizing commands to streamline interaction.
→ Entities: Entities in Dojo are primary key values within the world, allowing for diverse combinations of attached components.
→ Commands: Commands in Dojo are generalized functions that streamline system implementation and improve code readability.
→ Storage: Dojo's World contract centrally manages and maintains overall state, facilitating a clean split in logic and state.
Sozo
Sozo, a robust migration planning tool, is developed to simplify the process of updating and deploying AWs.
The tool incorporates an intuitive binary CLI for efficient World management.
Sozo can be conveniently installed via dojoup, Dojo's dedicated package manager.
The introduction of a GUI is planned for future updates to Sozo, enhancing user interaction.
Recursive Proofs
Starknet's unique approach to recursive proofs revolutionizes game performance and scaling. It allows for the verification and consolidation of proofs into a 'proof tree', resulting in the capacity for parallel proof computation.
Furthermore, it enables the verification of a proof from one layer on a lower layer.
→ Layer 1
It is founded on Ethereum, providing robust security mechanisms inherent to the Ethereum blockchain.
→ Layer 2
It’s a bespoke layer designed with a DeFi focus.
It ensures stability and reliability but operates with slower block times and exhibits less flexibility, accommodating updates and maintaining an unhurried pace.
→ Layer 3
This is the dynamic layer that supports more exotic configurations.
It houses high-throughput, centralized sequence servers responsible for verifying sequences that can be checked into the second layer.
This layer opens up an array of possibilities, including the creation of layered or sharded worlds.
Katana
Katana is a high-speed local Starknet node specifically engineered to assist with local development within Dojo.
It allows for the creation of a local testnet node, enabling developers to deploy and test Starknet smart contracts.
Its features include adjustable mining modes and HTTP connection support, making it a flexible tool for various development scenarios.
Torii
Torii acts as an all-encompassing indexing and networking layer for Dojo worlds.
It methodically arranges the state of these worlds, thereby ensuring efficient data querying for users.
Team & Support
It is an MIT-licensed open-source project, with notable contributors including teams from Cartridge, Realms & BibliothecaDAO, and briq.
Cartridge is leading the development of Dojo and building managed infrastructure (gaming specific layer 3s)
Tarrenece - is one of the core contributors of Dojo & is fairly active on Twitter.
Partnerships & Updates
They been working hard on hosting events, hackathons & also giving out grants to developers to build on the Dojo engine.
Check out a few of the interesting updates here:
$20k+ given out in grants: link
First end-to-end test of LootRealms: link
Chess on Dojo: link
Part of many hackathons: link
Announcement of Katana: link
How to get involved?
Thank you for taking the time to learn about Dojo - hope you find them interesting enough.
If you’d love to explore more, please check out: