Analyzing Frontier Model Progress with My Favourite Game: Prince of Persia
A developer used successive frontier AI models to port the original Apple II and DOS source code of Prince of Persia to C#, achieving a pixel-exact recreation.
read it It provides a fascinating, detailed look at how frontier AI models handle complex legacy codebase porting and self-correction when given environmental feedback tools.
summary
A developer tested successive AI models, from Claude Opus 4.6 to Opus 5.5, on the task of porting the classic game Prince of Persia to C# using its original assembly source. Early models struggled with core architecture and guessed coordinates by eye, resulting in broken gameplay. When later models were given tools to interact with DOSBox and reference the open-source SDLPoP disassembly, they diagnosed the rendering engine and matched the original game pixel-by-pixel. The experiment demonstrates that frontier models excel at legacy code translation when provided with environmental testing tools rather than raw prompts alone.
key points
- Early models like Claude Opus 4.6 failed because they picked a tile-grid architecture instead of frame-sequence animation and lacked runtime testing capability.
- Giving Claude Opus 5 tools to interact with DOSBox and verify screenshots enabled self-correction and produced the first playable version.
- The final breakthrough came when Claude Opus 5.5 ported the battle-tested room-drawing routines from the open-source SDLPoP project rather than guessing coordinates visually.
who should read it
Software engineers and game developers interested in practical applications of AI for legacy code migration and reverse engineering.
discussion warm
consensus
Commenters are amused by the stark contrast between the author's poorly articulated prompts and the models' impressive output, while noting that giving models visual feedback loops and existing open-source documentation is the real driver of success.
pushback
Some commenters argue that letting models build iteratively on previous broken codebases introduced bias, and that a true model comparison required starting from scratch each time.
Generated by an LLM from the article and thread. Check the sources before relying on it.