Diamond Pit is an example game built on Cubzh using the Dojo SDK, demonstrating fully on-chain game integration.
Cubzh is an open-source and fully scriptable game engine, at the intersection of Minecraft and Roblox.
Dojo is a provable game engine and toolchain for creating fully autonomous, on-chain games and worlds on Starknet.
The Dojo API is available in Lua when launching the dojo edition of Cubzh, as specified here in the cubzh.json: https://github.com/cubzh/diamond-pit/blob/main/cubzh.json#L6
⭐️ Best way to help us: add a star to Cubzh repository ⭐️
In Diamond Pit, players navigate a vast pit, mining blocks to sell and upgrade their equipment. Key features include:
- A central, massive mining pit
- Upgradable pickaxes and backpacks
- Rebirth system for progression
- Collectible pets obtained from eggs
- Goal: Collect all 6 unique pets
- Fork this repository
- Your version of the game is now accessible at https://app.cu.bzh/?script=github.com//:
- Update the "Play" button URL in the README (replace with URL of your fork)
- Visit your Github repository page and click "Play"
- Make desired changes in
world.lua
- Push your changes and access your version at:
Note: Include the commit hash to bypass the one-day cache.
https://app.cu.bzh/?script=github.com/<username>/<repo>:<commithash>
- Install Dojo version v1.0.0-alpha.12
- Navigate to the contracts directory:
cd contracts
- Build the project:
sozo build
- Update the RPC URL in
dojo_dev.toml
- Apply migrations:
sozo migrate apply
- Generate the pit:
./regenerate.sh
- Set up a cron job to run this script every 5 minutes
- Cubzh x Dojo tutorial coming by the end of October with a VSCode extension to iterate faster
- Starknet mainnet and testnet integrations with Dojo Controller
- Implement off-chain messages for smoother player movements
- Feature: select a pet that follows the player and provides bonuses