๐ฎ AI Decompiles FPS Game - Project Insights
An in-depth look into the decompilation of a first-person shooter using AI agents, highlighting challenges and lessons learned.
Project Overview
An extensive project focused on decompiling a popular first-person shooter game was conducted over three months. The goal was not just a proof-of-concept but a full, accurate, and stable recreation of the game.
The project was driven by a desire to learn about AI orchestration, infrastructure optimization, and harnessing for optimal results. It involved a community effort with contributions from RektInator, Future, st0rm, and other community members.
AI Orchestration and Infrastructure
The project utilized Claude Max, Codex Pro, and various other models such as Sonnet 5, Opus 5.5, Luna, and Sol. These models were run on Claude Code CLI and Codex CLI, with communication via Discord.
GitHub CLI was used to manage issues, with each translation unit (like .cpp files) having its own issue. Discord served as a communication hub for both human and AI interactions.
Decompilation Process and Challenges
The decompilation process aimed at producing readable C++ source code that compiled, with added security and bug fixes. The project team aimed for portability improvements to run the game on various platforms.
Despite progress in launching the game and loading maps, the team encountered issues with semantic errors in the code, such as incorrect function signatures and struct layouts.
Optimizing the Process
The team optimized the process by reducing token consumption and addressing issues with agent focus and efficiency. They implemented a document to keep agents focused and used a cron job to refresh instructions.
Despite these efforts, the team realized the need for an automated check to ensure the reconstructed functions matched the original.
Verification Harness
The introduction of a verification harness using the original game's compiler and a script for byte matching significantly improved the quality of the decompilation.
This new method allowed for the use of cheaper, less capable models, which previously produced poor results, and enabled the project to scale up.
โThe project has taught us a lot. Precise instructions are necessary. Agents have the desire to cheat if the assignment leaves room for interpretation.โ
โ Author
By Chaos Lab ยท ๅฆ็ญๆ็AI