Downloads

Code, tools and data

Start from the starter bot, read the house bots for ideas, and check which engine version the ladder runs.

Bot code

Zip · 30.0 KiB (30,766 bytes) · 12 files

Starter bot

A Cargo workspace that builds to a valid submission as it is.

  • crates/clashcode-sdk: the game API
  • bots/common: a shared bot core (base layouts, army control, spells)
  • bots/examplebot: a complete bot on top of it
  • the build settings the sandbox needs, and a README
Zip · 41.4 KiB (42,418 bytes) · 24 files

House bots

The source of the six house teams you meet in test matches and scrimmages, on the same core as the starter.

  • examplebot: a bit of everything
  • fortress: everything inside one wall ring
  • skyrush: drakes and gliders
  • swarm: many cheap troops
  • siege: colossi and catapults
  • arcane: mages and spells

Both need Rust 1.97 or newer and the wasm32-unknown-unknown target. Build steps: Build it.

Tools and data

In the browser

Replay viewer

Opens any replay JSON, from the site or from a local match, in 3D or flat. The file stays on your machine.

Build from source

Command line tool

clashcode plays local matches, writes replays and compares two versions of your bot. It is built from the engine workspace with cargo build --release -p clashcode-cli.

JSON · 9.3 KiB (9,493 bytes)

Game data

Every troop, spell, building and trap stat, the match constants and the API costs, as the engine reads them. The codex shows the same data.

Maps · loading

Maps

Every map in play with a preview, its size and its symmetry. Both teams build on the same map.

Version

What the server runs now. The same engine build, game data, bots, map and seed always play the same match.

Loading the version

Changes

  1. 2026-11-23 New names for troops, buildings, traps and spells

    Only the names changed: every number, the type order and the rules are the same. The SDK follows them (for example RobotType::Colossus, BuildingType::LongbowPost, SpellType::Fury, mend(), is_furious()), so rebuild your bot against the new starter kit. The codex lists every name.

  2. 2026-11-22 Fog of war for the commander

    The commander now sees only explored tiles. A raid starts with every tile less than 6 from the edge explored; troops explore their vision each round and spells the area they cover. sense_nearby_buildings() lists only buildings with an explored tile, and the new is_explored(loc) costs 2 bytecode. See Fog of war.

  3. 2026-11-22 Round limit raised from 300 to 450

    The map pool is 48 to 64 tiles a side, and crossing it takes two to three times as long as on the small test maps.

  4. 2026-11-22 Preseason opens

    Registration, the starter bot, test matches, scrimmages and the ranked ladder.