HeadlinesBriefing favicon HeadlinesBriefing.com

AI Ports Prince of Persia: 3 Model Attempts Compared

Hacker News •
×

In 2012, Jordan Mechner released the original Apple II 6502 assembly source for Prince of Persia. An enthusiast later used frontier AI models to port the game to C#, without editing the code himself. In February 2026, Claude Opus 4.6 produced a C# console version, a level editor, and a Raylib graphics build.

It parsed level files correctly and rendered Apple II-style visuals, but gameplay failed: movement was broken, the prince fell through floors, and arrow keys didn’t work. The core issue was architectural—the AI built a tile-grid engine, while the original uses hand-drawn animation frames with per-frame movement. In March 2026, Open AI Codex refined the graphics: sharp pixel filtering, transparent sprites, walkable gates, and fixed pillar collisions.

Still, the prince got stuck in wrong positions. In September 2026, Claude Opus 5 changed the approach. Using custom skills to control DOSBox and Windows apps, it compared the port against the original DOS game.

It diagnosed the tile-grid flaw and rebuilt the engine around frame-sequence animation. It extracted real animation frames, dungeon art, and all 15 levels directly from PRINCE. EXE by matching byte patterns from the Apple II source.

No copyrighted data entered the repo—the C# version reads live from the author’s DOS install. After an all-night session, the prince dropped, landed, turned, ran, jumped, and crouched correctly. A second session fixed a ledge-detection bug by reverting to the original assembly routine.

Levels still didn’t look perfect, but the core gameplay was finally authentic.