LLM-Driven Reverse Engineering: Rebuilding a Classic RTS Game in 14 Days
A 14-day experiment used a large language model to reverse-engineer and rebuild a late-1990s real-time strategy game whose source code had been lost. This article examines the project’s milestones, proprietary file formats, licensing considerations, automated testing, and implementation decisions—and explains how human oversight shifted from line-by-line review to behavioral validation and architectural judgment.
1. The Experiment: An Ambitious Goal with Engineering Constraints
A classic real-time strategy game released in the late 1990s had lost its source code. Only executable files and asset packages remained available. Traditionally, recreating such a game would require a team to spend years analyzing file formats, reconstructing game logic, and rebuilding the engine.
Current frontier large language models offer two capabilities relevant to this work: reverse-engineering support, including inferring data structures from binary patterns and file layouts, and sustained, high-throughput code generation under human supervision.
The experiment therefore set a concrete goal: use an LLM to complete asset-format parsing, interface reconstruction, combat logic, and multiplayer functionality within 14 days.
The reported outcome suggests that rebuilding software without its original source can be a viable AI-assisted engineering approach when tasks are carefully decomposed and clear guardrails are established.
2. Planning: Three Milestones Across 14 Days
At the start of the project, the model independently produced a development schedule:
- Days 1–3: Pre-alpha. Reverse-engineer all asset file formats, establish the data-loading pipeline, and implement the user interface framework.
- Days 4–9: Alpha. Implement the core gameplay systems, including units, pathfinding, attacks, and construction.
- Days 10–14: Beta. Build multiplayer services and networking protocols, delivering an end-to-end playable version.
The schedule mattered less for its exact dates than for its treatment of risk. Format reverse engineering—the least predictable part of the project—came first. If progress stalled there, the project scope could be adjusted before substantial work accumulated elsewhere.
3. Day 1: Tackling Legacy File Formats
3.1 Working Without Ready-Made Parsers
The game relied on proprietary formats created by its original developers: custom compression algorithms, image containers, and archive indexes.
These formats originated when standard libraries were less widely available. Their implementations contained magic constants, bit-level operations, and unaligned memory layouts. Few usable parsers could be found online.
Most of the model’s work on the first day went into two activities:
- Reconstructing decoding logic from the executable.
- Inspecting resource files for structural features such as magic signatures, byte order, block lengths, and checksums.
3.2 An Observation About Licensing Caution
One notable behavior emerged during the experiment: when directly instructed to copy an open-source implementation, the model refused; when told that similar algorithms had been implemented elsewhere, it would investigate the underlying approach and relevant constants.
Legacy video decoding provided a representative example. Only two or three usable open-source implementations were available for the game’s video format. One used a strong copyleft license that conflicted with the project’s intended license. Another used a weak copyleft license that also introduced constraints for the intended static-linking scenario.
The model followed this sequence:
- Checked the licenses of the candidate libraries.
- Assessed the obligations associated with static linking and concluded that directly incorporating them was unsuitable for the project.
- Chose to implement the decoder independently.
- Produced a working implementation roughly ten minutes later.
The new decoder used key magic constants that matched those in public implementations. In the experiment’s account, those constants represented factual elements of the file format rather than creative code.
The lesson drawn from this episode was that the model showed considerable licensing caution and distinguished between reimplementing an understood algorithm and copying code line by line. Subsequent format work followed the same approach: study the underlying principles, then write an independent implementation. This substantially improved progress.
4. From Day 2 Onward: Running the Automation Pipeline
4.1 Human Oversight Shifted from Code Review to Acceptance Testing
The experiment began in early September. The model ran almost continuously, averaging approximately 400 code commits per day.
At that rate, reviewing every line was no longer practical. Human supervision instead focused on three mechanisms:
- Behavioral acceptance testing: Could the game launch? Were interface elements interactive? Could units engage in combat?
- Automated testing: The model maintained parsers alongside regression fixtures for their corresponding formats, updating tests as parsing behavior changed.
- Milestone gates: Each phase ended with a full smoke test. A failing build could not advance to the next phase.
This produced a workflow in which AI wrote the code, continuous integration validated it, and humans made the acceptance decisions. The human role shifted from primary code author to acceptance owner and architectural reviewer.
4.2 Common Problems and Their Solutions
Format Parsing: Actual Behavior Took Priority Over Ideal Specifications
The biggest obstacle was irregular behavior in legacy implementations. The original game contained special cases that happened to work, including resources associated with out-of-bounds reads and garbage values in uninitialized fields.
The model was directed to infer behavior from the actual files rather than assume a clean, idealized specification. This matched the practical approach used in human-led reverse engineering: reconstruct what the software really does, not merely what a tidy format definition suggests it should do.
Interface Reconstruction: Convert Layouts Instead of Rewriting Every Screen
The interface work required translating an older immediate-mode drawing system into a component tree suitable for a modern UI framework.
The model first reverse-engineered the interface layout description files. It then built an automated conversion layer that mapped legacy layout data to properties on the new framework’s controls.
This avoided manually recreating each screen.
Combat Logic: Keep Unit Data Outside the Engine
Combat implementation represented the largest workload. It covered hundreds of unit types, their attributes, weapon trajectories, and faction rules.
The model moved unit data into external configuration files and kept the engine focused on a generic rules interpreter. This architectural choice substantially reduced the amount of code and the incidence of errors.
5. Reusable Lessons from the Experiment
The project produced several practical lessons for AI-assisted development:
Define constraints before granting autonomy. Establish licensing requirements, architectural conventions, and directory structure at the outset. In this experiment, the model followed these constraints closely—sometimes more cautiously than a human developer might.
Use milestones with explicit acceptance criteria. Do not let an AI system generate code without direction. Organize work into data, interface, gameplay, and networking layers, with a clear completion gate for each.
Treat humans as acceptance owners. At high output volumes, line-by-line review gives way to behavioral testing and smoke-test validation. Human judgment remains central to deciding whether the result meets the project’s requirements.
Focus on principles rather than requests to copy code. Discussing algorithms and format behavior helped the model produce independent implementations while respecting the project’s licensing constraints.
Expect legacy formats to consume disproportionate time. Provide any available documentation or community-maintained format descriptions early. These materials can save days of reverse-engineering work.
6. Conclusion
Rebuilding a classic game with no surviving source code in 14 days would have seemed implausible only a few years ago. This experiment indicates that LLMs have the potential to support large, end-to-end reverse-engineering and reimplementation projects.
The main constraint is no longer code generation alone. Equally important are human task decomposition, a reliable acceptance-testing system, and a clear understanding of the boundaries of AI behavior.
For engineering teams, the practical opportunity is to establish a workflow in which AI generates code, automation validates behavior, and humans retain control over architecture and acceptance. The experiment’s central lesson is that this operating model—not code-generation throughput by itself—is what makes rapid AI-assisted rebuilding workable.
