paper 2.1 · live · testnet
Hex'd
2026 · author
Abstract
A fully onchain asynchronous battle royale with fog of war. Players cross a hex grid where every empty tile is a gift or a curse, and walking into another player resolves combat by XP. All logic, state and randomness live on Starknet through Dojo; the client is a playable 3D board.
Keywords: cairo · dojo · starknet · react · three.js · cartridge controller
1Deployment record
- role
- author
- status
- shipped
- net
- testnet
- years
- 2026
- stack
- cairo · dojo · starknet · react · three.js · cartridge controller
| parameter | value |
|---|---|
| grid | 21 × 21 hexes, axial coordinates |
| fog of war | 6-bit neighbour bitmask |
| rng | Poseidon hash of game state |
| max concurrent games | 350 |
| event types | 7 |
| network | Starknet Sepolia |
2Figures
pub fn resolve_combat(
ref world: dojo::world::WorldStorage,
token_id: felt252,
defender_token_id: felt252,
ref state: PlayerState,
direction: Direction,
) -> CombatOutcome {
let old_position = state.position;
let next_vec = get_neighbor(old_position, direction);
let mut attacker_stats: PlayerStats = world.read_model(token_id);
let mut defender_stats: PlayerStats = world.read_model(defender_token_id);
// Higher XP wins. Equal XP penalises defender (attacker wins).
let attacker_won = attacker_stats.xp >= defender_stats.xp;
let mut attacker_died = false;
let mut defender_died = false;combat.cairo; combat goes to the player with more XP, and a tie goes to the attacker.source ↗
3Ledger entries
| height | hash | date | event |
|---|---|---|---|
| #06 | 0x28124d…526f | | [Submission]: Hex'd (#276), Dojo game jams |
References
- Hex'd. Source repository. github.com/FemiOje/hexed ↗
- Hex'd. Live deployment. hexed-silk.vercel.app ↗
- [Submission]: Hex'd (#276), Dojo game jams. 2026-03-08. github.com/dojoengine/game-jams/pull/276 ↗