Turn-based artillery on Starknet — a love letter to GunBound, rebuilt on-chain.
2–4 players take turns aiming and firing across a destructible Metamine terrain map. Wind shifts every round. Last tank standing wins. All game logic lives on-chain.
In Starkbound, the chain is the game engine:
- Physics trajectories computed in Cairo
- Damage with proximity falloff validated on-chain
- Wind generated via Poseidon RNG, stored per turn
- Terrain destruction written as
TerrainRowbitmap models - Victory conditions checked by the contract after every shot
The client is a rendering layer — not a logic layer. The authoritative result always comes from the chain.
| Component | Implementation |
|---|---|
| Game & lobby state | GameState, Lobby, Player Dojo models |
| Per-tank state | TankState model (hp, shield, position, alive) |
| Physics simulation | Trajectory calculation in Cairo (helpers/physics.cairo) |
| Damage calculation | Proximity falloff computed on-chain |
| Terrain destruction | TerrainRow bitmap model — craters written per shot |
| Wind system | Poseidon RNG seeded per turn, stored in GameState |
| Turn management | current_slot and phase tracked on-chain |
| Victory condition | alive flags checked after every shot |
| Shot validation | All shots validated by the contract before state update |
Stack: Dojo 1.7.2 / Cairo 2.13.1 — contracts in contracts/, client in client/ (React + Vite + TypeScript + starknet.js v8).
The main menu has three panels:
- Profile — create a burner wallet and enter your pilot name
- Create Room — host or join a multiplayer lobby
- Tutorial — learn the game solo vs. a bot (fully off-chain, no wallet needed)
Tutorial mode walks new players through the core mechanics step by step:
- Moving your tank into position
- Panning the camera (click and drag)
- Adjusting shot angle
- Charging and firing
- Accounting for wind
- Completing a match vs. the Ice bot
No lobby, no contract calls — instant access, BGM included.
- Create a burner wallet from the Profile panel
- Enter your pilot name and spawn your player
- Open Create Room — host a lobby or join with a room code
- Select your tank:
- Armor — high HP, balanced stats
- Ice — slows terrain on impact
- Lightning — chain damage that arcs to nearby tanks
- Once all players mark ready, the host starts the game
- On your turn: move, pan the camera (click and drag), set angle, read the wind compass, charge and fire
- Last tank standing wins — results shown in the end-game overlay
Requirements: slot
# Authenticate
slot auth login
# 1. Create Katana (epic tier, standalone with dev accounts)
slot deployments create starkbound -t epic katana --config katana_slot.toml
# 2. Deploy contracts against the slot katana RPC
# Get the RPC endpoint from: slot deployments describe starkbound katana
sozo migrate --profile slot
# 3. Create Torii pointing to the slot katana
# Fill in rpc and world_address in torii_slot.toml first
slot deployments create starkbound -t epic torii --config torii_slot.tomltorii_slot.toml:
rpc = "https://api.cartridge.gg/x/<project>/katana"
world_address = "<world_address>"
[indexing]
allowed_origins = ["*"]
transactions = true
contracts = [
"erc20:0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7", # ETH
"erc20:0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d", # STRK
]
[events]
raw = trueRequirements: Dojo 1.7.2, Scarb 2.13.1, Node.js
# Terminal 1 — local chain
make katana
# Terminal 2 — indexer
make torii
# Terminal 3 — deploy contracts
make setup
# Terminal 4 — client
cd client && npm install && npm run devOpen http://localhost:3000.
Copy .env.local.example to .env.local and fill in the Katana dev master account address and private key.
Starkbound was built as part of Game Jam N8, organized by Cartridge.
@dub_zn + Codex + Claude
Starkbound is a tribute to Gunbound. All visual assets used in this project are property of Softnyx Co., Ltd. and are not original works of this project's author. This is a non-commercial fan project built for learning and competition purposes.