AI for Games
AI for Games / Games

CODECRAFT

A strategy game where your code commands the robots. Write a program, run the simulation, see what happens, and fix it.

Playtest in progress · build 13, 13 Oct 2026
3of 9 campaign missions
3robots: worker, assault, ranged
8buildings
3resources: ore, gold, silicate
v13build in playtest
RU · ENswitch without restarting
About the game

Code instead of clicks

You rebuild a robot colony, but you don't give orders with the mouse. Each robot gets a short program in CraftScript, a small language with Python-like syntax.

Once started, the robot gathers resources, builds, scouts the map and fights on its own. If the result isn't what you wanted, pause, edit the code and run it again.

It's a strategy game where code is the main way to play, not a programming lesson in disguise. The playtest includes the first three missions of the Inheritance Protocol campaign.

Assault robot · scout and attackcraftscript
def engage(data):
    attack(data.enemy)

listen(event.enemy_spotted, engage)

while True:
    attack_nearest()
    explore()
Worker · prioritiescraftscript
limit = 40

while True:
    if has_blueprints() and construction_available():
        construct_nearest()
    elif silicate() < limit:
        gather(entity.silicate)
    else:
        gather(entity.gold)
What's in the game

Features

  • A program for every robotRun, Pause, Stop and Editor buttons on the selected robot.
  • An editor that helpsSyntax highlighting, Tab completion, argument hints and errors shown as you type.
  • Real debuggingBreakpoints, variable values on hover, highlighting of the current line and the line being waited on.
  • Robot logprint(), the last 40 entries, number of gathering trips, trips per minute and wait time.
  • Real logisticsOre piles up in the extractor and workers haul it; the neutral gold mine has to be captured and repaired.
  • Eventsevent.attacked and event.enemy_spotted are hooked up with listen.
  • Script librarySave your programs and reuse them in each other with import.
  • Building from blueprintsWorkers deliver materials and assemble a building in stages; blueprints can be cancelled and buildings demolished.
  • DefenseWalls with connected sections, gates that let your own units through automatically, towers with rotating turrets.
  • CombatAssault robots with flamethrowers and ranged robots with lasers; direct fire with fire and moveAndFire.
  • A living opponentIn the third mission the enemy runs its own economy: it gathers resources and builds fences.
  • Fog of warShared vision for your side and a minimap; game speed ×2 and ×5.
Inheritance Protocol campaign

Three missions in the playtest

Start of the First Signal mission
Mission 1 · 136 × 136 map

First Signal

Place an extractor, set up gathering of three resources, build a factory, produce three assault robots and destroy the guard robot.

Teaches the basics in 13 steps: from a single construct_nearest() command to a while True loop, scouting and the enemy_spotted event.

Preparing the base defense
Mission 2 · 90 × 90 map

Base Defense

The base is already there. Fortify the two northern passes with walls, gates and towers: 30 seconds after the third tower, 12 enemies attack from two sides.

Teaches building fortifications and preparing programs for defense.

First Assault: the road to the enemy base
Mission 3 · 112 × 112 map

First Assault

The enemy has a base just like yours, with its own economy and defenders. Find it in the fog of war and destroy every building and robot.

Teaches offense: scouting and attacking in a loop. The Last contact button helps.

The CraftScript language

What robots can do

A program runs once from top to bottom; repetition is explicit, with while. It isn't real Python: the interpreter has no access to files or the network.

Actionsgather(entity.ore)construct_nearest()explore()attack_nearest()attack(target)fire(angle, count)moveAndFire(…)
Movementmove_to(point(x, y))retreat_to(point(x, y))patrol(area(x, y, w, h))stop_movement()
Queriesore()gold()silicate()health()enemy_count()find_nearest(kind)has_blueprints()
Eventslisten(event.attacked, f)listen(event.enemy_spotted, f)

The handler receives data.attacker, data.enemy and data.position.

Syntaxwhileif / elif / elseand / or / notdef f(x):import

No for, lists or classes yet.

Build history

13 builds since 20 September

Almost every build responds to playtester reports; those changes are tagged “from reports”. Where a date or the contents are approximate, they are marked ≈.

  1. Build 1313 Oct 2026in playtest

    Clear program launches and hints you can come back to

    Added
    • Mission guides always show Previous step and All steps buttons; rereading doesn't reset progress. from reports
    • ≈ Flamethrowers for assault robots and lasers for ranged robots, each with its own sounds; a 1/3 miss chance for attack commands, fire, moveAndFire and movement commands.
    Changed
    • The help explains that commands run one after another and that a loop repeats the whole block; the attack and scouting articles were clarified. from reports
    Fixed
    • After editing code, Run and Resume start the new program, not the old one; code with errors doesn't run. from reports
  2. Build 127 Oct 2026

    An editor that helps you understand your robot

    Added
    • Tab completion, argument hints, variable values on hover, breakpoints, print() and trip statistics.
    • Constants entity.ore and event.attacked instead of strings; old code still works.
    • Arithmetic with parentheses, error checking as you type, detailed runtime errors.
    Changed
    • New main screen with colony art and a Tutorial item; settings restyled to match.
    • In the campaign, the script library unlocks from mission 7.
  3. Build 115 Oct 2026after the first playtests

    One delivery first, then a loop

    Changed
    • The first mission's tutorial is split into 13 steps: first a single build and a single delivery, then while True. from reports
    • A hint for where to place the first extractor; the starting camera is pulled back and buildings have a larger view range.
    Added
    • A Copy code button and a Copy / Paste menu in the editor. from reports
    • Wall connection preview, cancelling a blueprint with materials refunded, demolishing your own buildings. from reports
    Fixed
    • A program without a loop runs once and stops; haulers no longer get stuck at the drop-off point.
  4. Build 104 Oct 2026CodeCraft in three days

    Base Defense and First Assault

    Added
    • The Base Defense and First Assault missions, an enemy economy, the Last contact button.
    • Walls, gates and towers; the robot log; an explanation of why a building can't be placed; coordinate rulers.
    Changed
    • Illustrated terrain, larger maps, tracked and wheeled chassis, shadows, damage, staged construction.
    • Selecting a robot with a click no longer stops its program.
    Fixed
    • FPS drops during waves; the archive shrank from 274.5 to 114.3 MB.
Builds 1–9
  1. Build 9≈ 2 Oct 2026
    Added
    • English language, language selection in settings and auto-detection.
  2. Builds 1–820 Sep – 1 Oct 2026concept playtest
    Added
    • The first mission, First Signal, and a step-by-step tutorial (12 steps by build 8).
    • ≈ Draggable code and help windows, a game icon and a loading screen.
Plans

What's next

These are plans from the design document, not promises.

  • 6 more missionsRoute scouting, multiple events and priorities, robot groups, coordination.
  • New language levelsStep-by-step delivery and assembly commands, programs for buildings and new events.
  • New erasSteel and Titanium, artillery, air and naval factories.
  • SandboxA testing ground on campaign maps and PvP arenas.
  • PvP and tournamentsPlayers submit a program; the server runs the playoffs and saves match replays.

Write your first robot

The playtest is free; the game installs through OnlyLauncher on Windows. After playing, fill in the survey: the next build is shaped by it.