What happens when you point an AI coding loop at a classic NES game and let it run?
I was curious how far an AI coding loop could get if you gave it a big, well-understood target. So I pointed Ralph at the original Legend of Zelda and asked it to rebuild the game as a playable TypeScript app in the browser.* The code below is what came out of that process.
The first prompt was simple: “Produce a prd.json that, after completion, will produce all the tickets necessary to build the original Legend of Zelda for the NES.” Ralph took the prompt and generated a full product requirements document broken into actionable tickets.
Ralph then executed on those tickets, completing in 2 iterations. The result was a prd.json containing 40 tickets and a first playable version of the game: 120 screens, an overworld, one dungeon, item drops, and secrets. Roughly 11% of the original map — not bad for a starting point.
With the foundation laid, I repeated the pattern. The third prompt: “Produce a prd.json that when complete will have the tickets to fill out the rest of the map and the second dungeon as well as anything that is missing.” Ralph generated a new set of tickets scoped to everything the first build was missing.
The final Ralph loop was the big one — 22 iterations to fill out the map and build the second dungeon. When it finished, the game had a complete overworld, two full dungeons, and all the missing pieces stitched together.
Across those four prompts and under 70 total iterations, Ralph produced a playable game with an overworld, dungeons, combat, items, and secrets. It's not a 1:1 recreation of the original, but the sheer volume of content that came out of the process is worth exploring.
* Sprites were sourced from the Oracle of Seasons PopTracker Pack and I did put in manual effort to get the sprites placed and looking correct. All game logic, architecture, and code was produced by Ralph.