f. ojetokun: onchain systems

title

paper 2.1 · live · testnet

Hex'd

O. Ojetokun

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
Table 1: parameters of Hex'd.
parametervalue
grid21 × 21 hexes, axial coordinates
fog of war6-bit neighbour bitmask
rngPoseidon hash of game state
max concurrent games350
event types7
networkStarknet 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;
Figure 1: combat.cairo; combat goes to the player with more XP, and a tie goes to the attacker.source ↗
Hex'd screenshot
Figure 2: Hex'd, as supplied by the author.

3Ledger entries

Table 2: this paper’s block in the ledger.
heighthashdateevent
#060x28124d…526f[Submission]: Hex'd (#276), Dojo game jams

References

  1. Hex'd. Source repository. github.com/FemiOje/hexed ↗
  2. Hex'd. Live deployment. hexed-silk.vercel.app ↗
  3. [Submission]: Hex'd (#276), Dojo game jams. 2026-03-08. github.com/dojoengine/game-jams/pull/276 ↗