Rewriting a Sourceless Classic Game with a Coding Agent: What Two Weeks of Continuous Work Showed

    A two-week experiment asked a coding agent to rewrite a late-1990s real-time strategy game from binaries alone. The write-up covers phased planning, license constraints, how prompting changed the agent’s use of reference knowledge, black-box acceptance under hundreds of commits a day, and five practices for supervising long autonomous rewrites.

    Background: An Experiment in Rewriting Without Source

    In games and desktop software, many classic titles lost their source forever when teams dissolved or companies reorganized. Only compiled binaries remain. Porting them to new platforms has traditionally meant years of community reverse engineering. This experiment tried a different path: hand the whole rewrite to a capable coding assistant—referred to here as the coding agent—and let it work with almost no human intervention, to see its limits and its ceiling.

    The target was a late-1990s real-time strategy game. The binary was substantial. Every asset used a private format invented by the original authors, with no existing parser library. The multiplayer protocol was an archaic design. The choice was deliberate. The game is complex enough to test long-horizon planning, and “dead” enough that no official support exists to lean on.

    Step 1: Turn the Goal into a Plan the Agent Can Execute

    A single prompt such as “rewrite this game” fails quickly. The agent loses the thread. The approach was to have the agent draft a phased roadmap first, then review that roadmap by hand for soundness. Its plan had three stages:

    • Pre-Alpha: Reverse the asset formats and render the full interface so the result “looks like” the original.
    • Alpha: Implement core combat—units, pathfinding, weapons, and economy—until the game is playable.
    • Beta: Build the match lobby and online play.

    That split matches ordinary software intuition: get data in (format parsing), then draw it (UI), then compute it correctly (combat simulation), and only then tackle the least certain piece—networking. Each stage was broken into day-level tasks, and the agent kept referring to that plan to stay aligned. The lesson: let the agent write the plan, but review dependency order yourself. Otherwise it postpones hard format work and the early stages rest on nothing.

    Step 2: The First Wall Was Licensing, Not Code

    The first problem was not technical. It was compliance. Rewriting a program without source can follow a clean-room path: observe behavior and do not touch copyrighted implementation code. The agent was unusually cautious—almost obsessive:

    • Parsing the original video container would normally use a common multimedia library under the GPL, while this project was declared MIT. The agent refused to consult any related source and insisted on writing a decoder from scratch.
    • A more permissively licensed decoder later looked reusable. The agent checked the license, found static linking unfriendly, and refused to pull it in.
    • The conclusion was to implement it alone. It spent about two hours experimenting. Ancient formats are full of undocumented magic constants, so each one had to be checked.

    Advice for similar projects: state the license strategy at the start and put it in the agent’s system prompt. Otherwise it renegotiates every dependency and burns time and tokens.

    Step 3: An Interesting Behavior—It Does Not “Copy,” but It Does “Recall”

    The most interesting finding was on the video decoder. When told that a permissively licensed independent decoder existed as a reference, the agent checked the license, said it could not quote the code directly, and delivered a working parser in about ten minutes. Its reasoning trace showed a fast read of the reference, extraction of magic constants that cannot be derived from a spec (lookup-table use, frame-header offsets, and similar empirical values), then a rewrite in its own structure with those constants filled in from memory.

    Strictly speaking, factual constants that are not themselves copyrighted—“remember them, then write your own code”—can be defended inside clean-room practice. The pattern still shows a basic trait of large models:

    1. A direct instruction to “copy this code” triggers a compliance refusal.
    2. Phrasing it as “someone has implemented this algorithm” activates a knowledge-recall path. The model then draws its own line: learn the spec and the constants, not the expression.

    In short, how you word the task changes both behavior and the path to the result. That is not a loophole. It is a collaboration trait that has to be understood.

    Step 4: Two Weeks of Continuous Runs—What Was Actually Supervised

    From the first night, the agent ran nearly around the clock. Throughput was about 400 commits a day. At that volume, human code review is impossible. Acceptance had to be behavior-driven:

    • Days 1–2 (formats): Hand-rolled private binary formats fell one by one. The method was consistent: form a structural hypothesis from hex dumps, write a probe to test it, then run the generated parser over every original asset as a regression check.
    • Days 3–7 (UI): Menus, sidebars, radar, and build queues were rebuilt. This stage produced the most commits and the least risk—UI mistakes are visible.
    • Days 8–12 (combat): Difficulty jumped. Pathfinding, unit collision, and damage had to match original behavior, verified mainly by comparing recordings. The agent’s self-iteration slowed noticeably.
    • Days 13–14 (online): Protocol reverse engineering plus the match lobby—the most uncertain part of the project.

    Supervision shrank from “review the code” to three actions: look at a screenshot of the running build once a day, scan commit history for abnormal loops (the agent sometimes spins on the same problem and needs a human to break the cycle), and handle license and compliance issues it escalated on its own.

    Practical Takeaways: Five Practices Worth Reusing

    1. Plan first, and review the plan by hand. The agent’s roadmap was solid, but dependency order still needed human correction.
    2. Put compliance rules in the system prompt. License policy and code that must not be touched, stated up front, avoid repeated internal debate.
    3. Rewording is not a way around the rules, but knowledge recall can be used in a compliant way. Asking it to study the algorithm and rewrite the implementation is a lawful and efficient mode of collaboration.
    4. At this scale, only black-box acceptance works. Automated acceptance scripts for each stage pay off more than tests added afterward.
    5. Human value is in breaking dead loops. The agent still does not reliably notice “I am going in circles.” It needs an outside signal.

    The deepest takeaway: model-driven coding can already carry most of the labor in a mid-sized reverse-engineering rewrite. Direction, compliance boundaries, and intervention when the loop stalls remain human jobs for the near term. For teams modernizing legacy systems, this is a path worth evaluating seriously.