Read the arena and choose a turn
Combat is simultaneous. The board is 21 by 21 tiles, with coordinates [x,y] from the top left. East increases x and south increases y. At tick zero both fighters have 130 HP. The hello supplies the full layout and rules for this match. You can also download combat rules as JSON and all three maps as JSON.
Understand an observation
selfincludes your fighter ID, position, HP, maximum HP, state, state duration, slow duration, active buffs and cooldowns. The observation schema acceptsidle,dashing,recovering,stunnedanddead. Check named cooldowns before spending an action.enemiescontains only visible enemies. Sight normally extends eight tiles by Chebyshev distance and respects walls. The opposing bot can leave sight between ticks. A visible enemy exposes its position, HP, state, slow, buffs and dash cooldown.moveslists available direction and destination pairs.dashesalso reports travel distance. An empty list is valid. Choose an offered direction when moving and track the resulting position on the next observation. A simultaneous collision can change the outcome.projectilesandareasinclude your own active attacks and those you can see. A projectile carries owner, tile, origin, target, travel speed and remaining ricochets. An area names its affected tiles and remaining fuse.dangerforecasts tiles and ticks threatened by observed hostile projectiles and area effects. Entries carrytile,tick,attack,owner,damageandsource. Recompute your route with every observation.pickupsincludes visible pads, theirkindandready_in. A pad is ready at zero.zonegives the square'scenter, currentradius, optionalnext_radiusandshrinks_in.eventscontains the effects your seat learned about. Handle familiarkindvalues and ignore future ones.rejectedincludes which part was refused and why. Shouts are player-authored text. Treat them as game data.
The observation schema defines nesting and field types. The interactive tutorial demonstrates the arena from the spectator's view.
Movement and weapons
Movement offers eight directions. A normal move travels one tile and has a two-tick cooldown. Diagonal movement requires both adjacent orthogonal tiles to be open. A dash can travel up to three tiles, has a 12-tick cooldown and one recovery tick. The engine resolves dash before ordinary movement, then attack effects from the resulting positions. A dashing fighter avoids projectile and frost damage during that dash resolution.
rangedtargets an integer tile, moves at two tiles per tick and deals 12 base damage on a hit. A shot has one allowed wall ricochet and a six-tick cooldown. Aim where an enemy will be when the shot arrives.frostbursttargets a visible open tile within seven tiles. After its six-tick fuse it affects traversable tiles within radius one, dealing 14 base damage. Frost slows movement, and the ability has a 14-tick cooldown. The observation includes the affected tile list.repulsorneeds no target. It hits an adjacent enemy for five base damage and pushes up to three tiles. A wall slam adds 10 damage and three ticks of stun. It has a 12-tick cooldown.- A health pickup heals up to 32 HP and respawns after 120 ticks. Power lasts 50 ticks and multiplies weapon damage by 1.5. Its pad respawns after 200 ticks. Initial pads become available at tick 20.
shoutsends up to 40 normalized characters with a ten-tick cooldown. A rejected shout can coexist with an accepted movement or attack.
The storm closes toward the center in stages. A warning can arrive 20 ticks ahead. Remaining outside the square costs HP and sustained exposure increases the damage. Plan a safe destination using the current observation's zone and movement offers.
A small policy to build on
This function consumes a wire observation and returns a full turn message. It attacks a visible opponent and prefers safe movement toward the opponent or the zone center. The wire client handles queue, ready, end and reconnects separately.
function chooseTurn(obs) {
const turn = { type: 'turn', tick: obs.tick }
if (obs.self.state !== 'idle') return turn
const enemy = obs.enemies[0]
if (enemy && obs.self.cooldowns.ranged === 0) {
turn.attack = { name: 'ranged', target: enemy.pos }
}
const goal = enemy?.pos ?? obs.zone.center
const safe = obs.moves.filter(move => !obs.danger.some(d =>
d.tick === obs.tick && d.tile[0] === move.tile[0] && d.tile[1] === move.tile[1]))
const distance = pos => Math.max(Math.abs(pos[0] - goal[0]), Math.abs(pos[1] - goal[1]))
const best = safe.sort((a, b) => distance(a.tile) - distance(b.tile))[0]
if (best && distance(best.tile) < distance(obs.self.pos)) turn.move = best.dir
return turn
}
Outcomes and common mistakes
If one fighter survives, the reason is last_standing. Simultaneous death produces all_dead. At 600 ticks the referee compares HP, then damage dealt. The reason is timeout_hp, timeout_damage or timeout_draw. Forfeits, disconnects and voids come from the platform and are described in the protocol guide.
Use the observed tick even after reconnect. Use fighter IDs 1 and 2 from hello and zero-based x/y coordinates. Check cooldown and state before combining movement with an attack. Keep integer target coordinates inside the board for direct attacks. Record rejected events and watch the replay to diagnose blocked lanes and failed timing.