AI & Compute · 3 min read
AI Coding Agent Ships 10-Level 3D Game for Unmodified Commodore 64
Jonathan Field's Lest, a 10-level 3D game in 6502 assembly for the unmodified Commodore 64, was built with Claude Code across 645 commits — and beats the sub-10 fps norm.
Key takeaways
- Lest is a 10-level first-person 3D game written in 6502 assembly for an unmodified Commodore 64, built with Anthropic's Claude Code and released under MIT license.
- The repository logged 645 commits between August 7 and October 8, 2026.
- The renderer uses a 40x25 character-mode framebuffer (160x200 multicolor pixels) to exceed the sub-10 fps typical of prior C64 3D ports.
- The EasyFlash cartridge build loads in under one second via a 251-byte loader.
- The build pipeline auto-checks page alignment, memory overlaps, zero-page ownership, and undocumented 6502 opcode preconditions.

A 10-level first-person 3D game now runs on an unmodified Commodore 64 at frame rates its DOOM-port predecessors never reached, and Anthropic's Claude Code wrote the 6502 assembly. Developer Jonathan Field published Lest under an MIT license on GitHub, complete with playable browser, .d64 floppy disk, and .crt EasyFlash cartridge builds. The same binary runs on emulators, SD2IEC devices, and original NTSC and PAL hardware from 1982.
The repository logs 645 commits between August 7 and October 8, 2026, a two-month burst of iterative profiling in which Field used Claude Code to produce the codebase, the pixel art, and the level designs. That is the part worth pausing on. An AI coding agent did not merely autocomplete boilerplate; it worked inside one of the tightest memory and cycle budgets in computing history.
How does the renderer beat 10 fps on a 1 MHz 6502?
Previous 3D ports on the Commodore 64, including DOOM adaptations, typically delivered blocky visuals at frame rates below 10 frames per second. Lest clears that bar without any expansion hardware by abandoning full bitmap rendering. Instead it draws into a 40x25 character-mode framebuffer, producing 160x200 multicolor pixels from a custom character set.
That character set has an unusual origin: it was derived by sampling millions of rendered frames. The engine then layers several optimizations on top:
- Scenes are vertically mirrored, so only the upper half is computed.
- Raycasts use hints from the previous frame to run binary searches strictly for wall corners.
- Wall edges interpolate between corners rather than being traced in full.
- Dirty-region caching skips screen areas that have not changed.
- In-game entities use hardware sprites, culled by precalculated zones and clipped with per-frame occlusion stamps.
The result is a renderer that spends its cycles where the picture actually changes. One might call it frugality at the transistor level. The 6502 rewards nothing else.
What does the build pipeline check?
The project does not rely solely on manual assembly debugging. Field wrote a custom Node.js 6502 assembler, a disk-image writer, and a build-time memory compactor that lays out code from the bottom of memory and lookup tables from the top, loading level-specific mechanics on demand.
Before any disk or cartridge image is written, the build automatically verifies several conditions:
- Page alignment and memory overlaps.
- Zero-page ownership.
- Unreachable code.
- Preconditions for every undocumented 6502 opcode used.
The EasyFlash cartridge version loads in under a second, courtesy of a 251-byte loader that mimics Krill's disk-loader calling convention. That loader is small enough to fit in a sector, which is roughly the assembly-language equivalent of packing for a month abroad with carry-on luggage only.
A full regression and profiling suite lives in the repository's tools directory, including cycle benchmarks, frame-rate probes, sprite size-ladder generators, and automated checks in the VICE emulator to confirm that optimizations preserve visual output. Optional build flags generate Dvorak keyboard layouts and alternative SID audio filter tunings for original 6581 sound chips.
Why does this matter beyond retro computing?
The engineering story here is the verification loop. Claude Code iterated safely on a tight assembly budget because every change was checked by automated cycle benchmarks and emulator-verified visual regressions, not by human inspection alone. That pattern — agent writes code, pipeline proves it — is exactly the arrangement that makes AI agents useful on constrained targets, from eight-bit CPUs to embedded controllers in short supply elsewhere in the industry.
Lest is open source, browser-playable through an EmulatorJS build, and boots from a 1541 floppy image (lest-c64.d64) or an EasyFlash cartridge image (lest-c64.crt) on genuine hardware. The verifiable claim is modest and concrete: a 6502 assembly codebase, agent-built and machine-checked, now outperforms the sub-10 fps norm for 3D on the platform. Whether the same agent-driven method transfers to modern constrained silicon, the 645-commit history on GitHub offers anyone the raw material to find out.
mlq.ai (Source)
More from Nathan Brooks
Show full bio
Senior reporter covering people, launches and day-to-day practice in Semiconductors, chip manufacturing, hardware, AI compute at Chip Dispatch.
1,500 articles