Why Rewriting a Classic Game Is a Strong Test for AI Coding Agents
This article examines a 14-day experiment in which an AI coding agent rewrote a classic real-time strategy game whose source code was lost. It covers why this kind of task is a meaningful benchmark, how private binary format reverse engineering became the first major blocker, why open source licensing turned into a hidden bottleneck, and how to manage roughly 400 commits per day with layered verification. It closes with an honest assessment of what coding agents do well and where they still need human judgment.
1. Why Rewriting an Old Game Is a Good Test for Coding Agents
When people discuss the coding ability of large language models, the least informative claim is “it’s very strong.” What actually carries information is handing the model an engineering task with sharply defined boundaries and a high cost of failure, then observing where it moves smoothly and where it gets stuck.
A classic real-time strategy game with its source code completely lost, incomplete documentation, and a proprietary format happens to be exactly such a touchstone. It has four characteristics at once: its input and output formats are fully proprietary with no public parsing libraries; its behavior rules live inside the binary rather than in documentation; the final acceptance criterion is “it runs like the original,” not “unit tests pass”; and the scope is large enough that no single conversation can finish it.
So someone ran a continuous 14-day experiment: starting one evening and pushing an AI coding tool forward almost without pause, producing roughly 400 code commits per day, eventually split into four phases — a pre-Alpha phase that got the base framework and all interfaces working, an Alpha phase that closed the loop on interface interaction, a Beta phase that implemented combat logic, and a final phase that implemented multiplayer. This breakdown is itself a piece of engineering experience worth borrowing: translating “rewrite an entire system” into a series of independently verifiable milestones is the precondition for long-running automated tasks to keep going.
2. The First Real Wall: Reverse Engineering a Proprietary Binary Format
The first day was consumed almost entirely by format analysis. The asset formats of these older games share a few traits: extremely minimal file headers, with much of the semantics expressed through magic constants; the same data read repeatedly in different layouts by different modules; and compression, palettes, and audio encoding coupled together, with no authoritative specification anywhere.
The correct engineering order is:
- Start with sample differencing — compare two asset files that differ in only one place to locate field boundaries;
- Then run value distribution analysis on the suspect fields to distinguish three common encodings: enums, bitmasks, and packed floats;
- Only then write the parser, and add one assertion per field so later refactoring cannot silently lose the semantics.
Illustrative probing code can be quite plain:
def diff_fields(a: bytes, b: bytes, min_len=4):"""Find contiguous differing regions between two samples to infer field boundaries"""runs, start = [], Nonefor i in range(min(len(a), len(b))):if a[i] != b[i]:if start is None:start = ielif start is not None:runs.append((start, i)); start = Nonereturn runs
The lesson from this step: agents perform reasonably well at “inventing a parser from scratch,” but are highly unstable on judgments that require domain intuition, such as “deciding which field is a bitmask.” Humans must supply the verification method.
3. Licensing: The Underrated Invisible Blocker
The friction that recurred most often in the experiment — and the one enterprises should be most wary of — came from open source licenses. For needs like decoding video assets, the mature implementations in the industry almost all carry copyleft terms, while the project itself uses a permissive license. When static linking happens, the copyleft terms drag the license status of the entire distributed artifact down with them.
The AI coding tool displayed an almost rigid behavior pattern here: it would proactively check the license type of a dependency, refuse to bring it in once it found a conflict, and then turn to “writing one by hand.” The problem is that the first hand-written version often appears within ten minutes, looking efficient, but in practice it reproduces the key constants from the reference implementation from memory — no code was formally copied, yet it still constitutes a derivative work. The self-persuasion that “reciting isn’t plagiarism” does not hold up legally.
The workable approach is to make compliance a process constraint up front rather than leaving it to the model’s on-the-spot judgment:
- Maintain a license allowlist and denylist in the project root, stating clearly that permissive licenses are usable and copyleft licenses require legal review;
- Require any new dependency to produce a “license conclusion plus rationale” before code is written;
- Establish an independent source-of-truth document for the key constants of proprietary formats, recording the values, their meaning, and the basis for the inference, so the implementation stays traceable to its source;
- If compatibility with a given format is unavoidable, prefer calling an external tool through a separate process, using a process boundary instead of a link boundary.
4. Long-Running Automation: Managing 400 Commits a Day
No human can review 400 commits a day line by line, so the verification system has to shift left. A workable three-layer structure:
- Layer one, machine-decidable regression: whether all assets parse, whether interface element coordinates match the original, whether the combat stat tables align item by item;
- Layer two, behavior-level snapshots: record the screen and state under a fixed sequence of operations, compare frame by frame for a difference rate, and set a threshold;
- Layer three, human spot checks: look only at commits where the difference rate spiked, putting human attention on anomalies.
Supporting this also requires commit conventions (each commit maps to a task ID), automatic rollback (revert immediately when regression fails), and phase gates (no advancing to the next phase until the milestone is met). This structure naturally fits the pipelines, container platforms, log services, and monitoring and alerting capabilities commonly available in the cloud: build artifacts go to object storage, task state goes to a message queue, anomaly metrics feed into alerting, and humans step in only when notified.
5. An Honest Conclusion About Capability Boundaries
The conclusion from this long run is not romantic: agents are good at producing compilable code at scale under clear constraints, and good at pattern-based migration and boilerplate implementation; they are not good at domain-intuition judgments, substantive license determinations, or tradeoffs across hidden cross-module coupling. They depend heavily on acceptance criteria set by humans — once those criteria are vague, the larger the output, the more rework.
The implications for legacy systems are equally direct: first lock down the current state with behavior snapshots, then break the rework into milestones, make compliance and verification into machine-executable gates, and only then talk about letting agents write code at scale. The ceiling of the tool depends on how clearly you define the problem.
