Vibeleaderboard
← All Intel
Intel / article

Battle Isle 2 via spec

Source
aidistillery.dev
Author
muro
Date
From the Daily Brief

An ongoing reimplementation of the strategy game Battle Isle 2 serves as a field test of spec-first development with coding agents. Rather than porting the original code directly, the author first wrote a specification of the game's rules and data files. Questions the agents raised while working were collected into an acceptance suite, so ambiguities in the spec turned into tests. To recover behavior that the spec did not capture, the author used a small agent to trace the game running in DOSBox, and notes that agent-controlled tracing was too slow in places. The author's own conclusion is that porting function by function with an agent would likely have been faster than writing the spec first. That is a useful data point because spec-first workflows are often recommended for agent work on the grounds that a checkable spec keeps long tasks on track. On a legacy codebase where the original program already defines correct behavior, this project found the up-front specification cost more time than it saved. The project is still in progress, so the comparison reflects the author's assessment so far rather than a finished measurement.

Read the 2026-10-18 Brief →

Context

A post on the AI Distillery blog describes an ongoing attempt to reimplement Battle Isle 2, Blue Byte's turn-based strategy game, so it can run in a browser and eventually on a phone with better controls than the DOS original. The unusual part is the order of work. Instead of porting code, the author first wrote a specification, starting with every data format and then the game rules, before building the new implementation. An earlier attempt to work from an existing Windows remake, Battle Isle 2020, had stalled because the author could not make sense of its PowerBASIC code or find a compiler to build it.

Agents did much of the work of finding out how the original behaves. At first an asked the author questions about the game's behaviour and the author played the game to find the answers, which became an acceptance test suite still in use. That was slow, so the author set an agent to drive the game itself in DOSBox. Doing that through macOS accessibility APIs took ten minutes for a few clicks; DOSBox-X, with its debugger and GameLink support for fast input and screenshots, worked better, and the author patched it locally so agents could control several game windows in parallel.

The author reports good coverage of the data files, with a few missing fields that may not even be used, and thinks the spec is complete enough to make almost the whole game playable. The game logic has been trickier, and in hindsight the author would skip the spec and have an agent port individual functions or parts of the code directly, as other AI-assisted ports do, while valuing the spec work for the understanding of the game it gave. The port is not playable yet: units can move, attack and undo moves, but the web version lags behind the spec on mission triggers, weather and construction, it needs the player's own GOG copy of the game, and only a partial spec for the data files is published so far, the full spec not yet being in readable form.

Terms in this piece · Glossary
  • File — A named unit of stored data that keeps its contents while no program is using it.
  • Agent — A system in which a model repeatedly chooses operations, a harness carries them out, and the results return to the model to inform its next choice.
  • Function — A named block of instructions that takes inputs, called arguments, and hands back a result, called its return value.

Get the Brief

A cited digest of what matters for people building with AI, every morning. Unsubscribe anytime. See today’s edition

Read the source aidistillery.dev
Recommended reads