A developer going by ilreb has brought the 1996 Quake engine straight into modern web browsers. Dubbed Quake-SRP (the “slop rust port”), the project carries zero external dependencies and does not permit a single unsafe block anywhere in its codebase. Thirty years of legacy C were translated file by file into safe Rust, compiled to WebAssembly, and executed entirely inside a background Web Worker. Users can simply drag and drop an unmodified pak1.pak from their hard drives, load official mission packs, or even supply original CD audio tracks directly into the browser—all computing runs locally on device without a byte leaving the client.
Compiling Legacy C to WASM Inside a Web Worker
id Software’s Quake source code, open-sourced in 1996, is an intricate labyrinth of manual memory allocation, raw pointer arithmetic, and cache-conscious hacks. Instead of taking the modern shortcut of reimplementing the renderer with hardware-accelerated WebGL or WebGPU, the author deliberately retained WinQuake’s original CPU software rasterizer and its iconic 8-bit color palette. WebGL2 acts merely as a digital canvas blitter, responsible only for copying the final computed framebuffer pixels to the screen. Chapters 2 through 4 from pak1.pak, mission pack assets from pak0.pak, and ambient CD tracks can all be dropped right onto the window.
Shifting a vintage engine that once relied on raw hardware control into a browser Web Worker represents a fundamental architectural change. All WebAssembly execution runs on a background thread, maxing out a single CPU core, while the main browser thread handles user input and retrieves rendered visual frames and mixed audio chunks out of shared memory. Abandoning modern GPU pipelines to let a single browser core muscle through thirty-year-old software rendering guarantees minimal runtime variance across host environments. What looks like a brutish engineering choice effectively flattens a fragile cross-platform overhaul into a deterministic input-and-output translation problem.
Pixel-by-Pixel Visual Regression as Ground Truth
The true engineering fulcrum of Quake-SRP is its automated verification apparatus. To keep AI code generation grounded, the developer compiled a standalone headless binary from id’s original WinQuake C source code to act as an infallible reference oracle. The automated test suite executes across nine single-player maps in two separate resolutions, running for hundreds of frames with monsters fully active. It compares rendered 3D frames, user interface overlays, mixed audio samples, and internal demo playback game state against the C oracle frame by frame. The project’s documentation transparently catalogs known discrepancies rather than claiming speculative bug-for-bug fidelity.
Visual regression testing is well understood within emulator development—projects like Dolphin have long maintained comprehensive visual CI pipelines. However, running temporal pixel-by-pixel diffs across continuous 3D gameplay sequences while accounting for mipmap sampling boundaries and lighting gradients represents an entirely different class of challenge than web-based DOM snapshots. How much code an LLM can produce in a single prompt has never been the deciding metric; whether an automated harness can independently catch pixel-level divergences is the real anchor that tethers synthetic code to reality. Unless the reference oracle passes green, syntactically spotless code is worthless.
Figure: E1M1 rendered in the Classic preset (1280×960), faithfully matching original WinQuake behavior. Source: quake-srp repository screenshot.
Figure: The same level rendered in the default preset (1920×1080), featuring widescreen perspective and uncapped framerate. Source: quake-srp repository screenshot.
A Coordinator Agent Merging Only Verified Branches
The repository documentation clearly delineates the division of labor between human and machine. Claude, running via Claude Code, authored the code, refactoring steps, and accompanying documentation. The human engineer acted as an architect: setting constraints, playtesting builds, filing bug reports, and managing task briefs across isolated git branches. The project even employed a coordinator “chair” agent that only merged branches once every automated test and visual comparison passed completely.
This structure delegated the grueling burden of correctness verification to an existing deterministic oracle, freeing the human from tedious line-by-line code review of machine-generated syntax. The port ships with a ?classic parameter replicating authentic engine behavior, while the default ?slop mode incorporates widescreen viewport adjustments and unlocked refresh rates. The human remains accountable only for the qualitative play experience of the finished product, while the repetitive toll of fixing compiler errors, memory leaks, and pointer overruns is pushed entirely onto the generator loop.
Figure: Visual diff demonstrating perspective texture alignment across screens during automated test execution. Source: quake-srp repository screenshot.
Applying the Oracle Workflow to COBOL Mainframes
Beyond retro gaming nostalgia, Quake-SRP’s workflow resonated with engineers tackling enterprise software’s deepest technical debt. Developers on Hacker News shared similar experiences: using Claude to reverse-engineer proprietary engines by having the model run automated playback scripts, take periodic screenshots for dual-verification, analyze original binaries, and patch source state machines to guarantee determinism. As machine-driven verification and rewriting mature, the conversation inevitably turns toward the ancient COBOL systems quietly powering the world’s financial backbone.
Prohibitive manual verification costs and undocumented edge cases are why mission-critical banking mainframes remain stranded away from cloud-native architectures. While legacy code exhaustively captures core business rules, tangled dependencies make teams terrified of touching production systems. This is precisely where dual-run oracle harnesses shine. Once a high-precision input/output verification engine is online, a core banking migration ceases to be a career-risking leap of faith and becomes a calculated code-hedging exercise traded against compute cycles and time.
Dual-Use Risks in Reverse Engineering Protocol Interfaces
Yet this technological capability cuts both ways. If a closed loop of generative models and automated test harnesses can flawlessly translate a complex 1990s 3D engine by cycling through errors, diffs, and corrections, it can just as easily deduce and mirror the proprietary state machines of opaque closed-source systems. Commenters highlighted a darker implication: applying high-velocity black-box reverse engineering to critical infrastructure could produce forged protocol commands and spoofed interfaces capable of fooling perimeter defenses. While some countered that systems vulnerable to synthesis merely rely on brittle “security through obscurity,” others pointed out that cloning industrial control and HMI protocols carries consequences far graver than disputed bank ledgers.
A model trained to locate discrepancies and patch logical holes is fundamentally an optimizer converging on computable truth, completely agnostic to whether it is digesting a vintage video game or breaking into a gated industrial control system. Returning to Quake-SRP, what its zero-unsafe Rust code proves is pragmatic: when confronting massive, ancient software labyrinths, rather than humans drowning in oceans of AI-generated code, their highest leverage lies in crafting an uncompromising automated oracle. Such an oracle not only resurrects legacy software—it forms the iron guardrail governing synthetic code generation.
Reference Links:
- GitHub Repository Overview
- Quake-SRP Live Browser Demo
- Hacker News Community Discussion