AI Tool Fable Ports Classic FPS to Browser in Two Hours — With Full Multiplayer

AI tool Fable ports classic FPS Return to Castle Wolfenstein to the browser with multiplayer in two hours.
A developer used the AI coding agent Fable to port the 2001 classic FPS Return to Castle Wolfenstein to a web browser in roughly two hours, complete with fully functional multiplayer. Fable autonomously handled cross-branch patch grafting, Emscripten/WebAssembly compilation, OpenGL-to-WebGL graphics translation via GL4ES, network restoration, and even binary-level game asset extraction — work the developer estimated would have taken a year manually.
From Quake to Return to Castle Wolfenstein: The Shocking Speed of AI Game Porting
A developer recently shared a jaw-dropping project on Twitter: using the AI coding tool Fable, he ported the classic 2001 FPS game Return to Castle Wolfenstein (RTCW) to a web browser in roughly two hours — with fully functional multiplayer.
What's even more astonishing is that this wasn't a one-off. In the two days prior, he had already completed web ports of Quake 1 and Quake 2. Three classic shooters from the id Software era, reborn at breathtaking speed with the help of AI.
id Software is one of the most influential studios in PC gaming history, founded by John Carmack, John Romero, and others. The studio pioneered the technical paradigm of first-person shooters — from 1992's Wolfenstein 3D to 1993's Doom to 1996's Quake — each title representing the pinnacle of 3D graphics technology at the time. Crucially, Carmack open-sourced each engine under the GPL license after it was retired. This tradition has allowed the community to continuously maintain and port these classic games, and it also provided the legal and technical foundation for AI-driven porting efforts.
Fable Completes "A Year's Worth of Work" in One Hour
According to the developer, he pitched the idea of porting RTCW to Fable at 3:50 PM, and by 6:18 PM he was already playing the game — roughly two and a half hours total, including an hour at the gym. In other words, Fable's actual AI working time was approximately one and a half hours.
He candidly admitted that the work Fable accomplished involved a massive amount of complex low-level technical operations. If he had done it manually, it "would have taken a year, not an hour." This leap in efficiency is the most striking demonstration of what current AI coding tools can achieve.
Fable belongs to a new generation of AI Coding Agents. Unlike code-completion tools like GitHub Copilot, it's an "autonomous agent" — capable of independently planning tasks, executing multi-step operations, and handling file systems and build toolchains, rather than merely offering code suggestions. The core strength of such tools lies in understanding complex project context, making autonomous engineering decisions, and debugging and iterating when errors arise. Fable's capabilities in this case demonstrate that AI agents have evolved from "assisted coding" to "autonomously completing engineering projects."
Technical Details: How Fable Performed This Precision "Code Surgery"
The technical capabilities Fable demonstrated during the porting process go far beyond simple code translation — they represent a series of highly complex engineering decisions and operations. Below is the complete technical path as described by Fable itself.
Source Code Selection and Patch Grafting
Fable started with iortcw (a GPL open-source port based on ioquake3) as its foundation. ioquake3 is a community-maintained version of the Quake 3 engine, born after id Software open-sourced the Quake 3 engine code in 2005. It fixed numerous security vulnerabilities and added modern OS support. iortcw applies similar modernization work to Return to Castle Wolfenstein using the ioquake3 framework. The existence of these open-source projects is critical — they provide a clean, compilable, well-documented codebase that allows AI tools to understand the code structure and make targeted modifications, rather than facing a completely unknown binary black box.
While an existing WebAssembly port called Wwasm was available for reference (single-player only), the problem was that Wwasm's patches targeted the single-player code tree, and RTCW's multiplayer codebase differs enormously from single-player — with some files diverging by over 1,400 lines.
Fable's solution was remarkably elegant: it first diffed Wwasm against the original single-player code to extract the complete patch set, then grafted each #ifdef __EMSCRIPTEN__ code block one by one into the multiplayer code. #ifdef __EMSCRIPTEN__ is a C/C++ preprocessor conditional compilation directive, meaning these code blocks only take effect when compiled with Emscripten — allowing the same source code to compile as both a native desktop build and a WebAssembly build. This kind of cross-branch patch transplantation is an extremely tedious and error-prone task even for experienced developers.
Emscripten Compilation and Graphics Layer Adaptation
After completing the code grafting, Fable used Emscripten to compile the multiplayer engine into WebAssembly. WebAssembly is a binary instruction format designed as a compilation target that runs at near-native speed in web browsers, supported by mainstream browsers since 2017. Emscripten is not just a compiler — it also provides an emulation layer for system APIs like POSIX file systems, networking, and threads. A key challenge for game porting is that native games typically use a blocking main loop (an infinite while loop), whereas browsers require an asynchronous event-driven model. This necessitates a fundamental restructuring of the game's main loop architecture — Emscripten addresses this through APIs like emscripten_set_main_loop.
On the graphics side, Fable used GL4ES to translate the game's original OpenGL 1.x calls into WebGL2. GL4ES is an open-source graphics API translation library that converts legacy OpenGL 1.x fixed-pipeline calls (such as glBegin/glEnd, fixed lighting models, and other interfaces deprecated by modern graphics APIs) into modern shader-based calls. A game from 2001 uses the OpenGL fixed-function pipeline, while WebGL2 is based on OpenGL ES 3.0 and has no support whatsoever for these legacy APIs. GL4ES internally maintains a state machine that batches old-style immediate-mode rendering calls into modern Vertex Buffer Object (VBO) submissions and automatically generates equivalent GLSL shaders to emulate the fixed pipeline's lighting and texture blending behavior.
But the grafting process wasn't flawless — GL4ES's initialization code resided in the single-player renderer file, while multiplayer uses a different renderer. This caused an "OpenGL 1.1 required" crash error. Fable precisely pinpointed the issue and fixed it by adding an initialize_gl4es() call in the multiplayer R_Init function. This debugging ability — tracing back from an error message to the root cause at the code level — is the key capability that distinguishes AI agents from simple code generation tools.
Network Functionality Restoration and Server Setup
Wwasm had disabled networking for single-player mode. Fable re-enabled it and patched out a version 1.41 check that would have caused a fatal error. It then compiled a native iowolfded dedicated server from the same source code, ensuring that client and server protocols and packets matched perfectly, and deployed it on the classic mp_beach map via a systemd service.
Client-server protocol matching is a core issue in networked game development. The id Tech engine series uses custom UDP network protocols that include snapshot compression, delta updates, client-side prediction, and other mechanisms. If the client and server protocol versions don't match, even minor discrepancies can cause connection failures or game state desynchronization. By compiling both client and server from the same source code, Fable fundamentally avoided this problem.
"Archaeological" Extraction of Game Assets
Perhaps the most interesting challenge was acquiring the game assets. PK3 files are essentially standard ZIP archives with a .pk3 extension — a game asset packaging format adopted by id Software starting with Quake 3, containing textures, models, maps, scripts, sound effects, and all other game data. The engine loads all pk3 files in numerical order at startup, with later-loaded files overriding earlier ones with the same name.
The data from the 2001 CD version ISO was encapsulated in a Wise installer Setup.exe, and Wine couldn't install it properly due to i386 dependency issues. Fable's approach was nothing short of "digital archaeology": it used the offzip tool to scan the binary file for deflate compression streams, directly "carving" out the complete pak0.pk3 (316MB), mp_pak0.pk3 (containing all 8 multiplayer maps), and UI menu resource packs. This technique is known as "file carving" in the digital forensics field — recovering files from raw binary data by identifying file format signatures and structures, without relying on file system metadata.
Finally, the client fetches these resource packs via HTTPS, loads them into the Emscripten file system, and mounts them using IndexedDB (IDBFS). IndexedDB is a client-side structured storage API provided by browsers, capable of storing large amounts of data (typically hundreds of MB or even GB), completely different from localStorage's 5MB limit. Emscripten's IDBFS file system driver persists the virtual file system's contents to IndexedDB, so the 380MB of game data only needs to be downloaded once and is then cached locally, loading directly from local storage on subsequent visits.
The Capability Boundaries of AI Coding Tools Are Expanding Rapidly
The significance of this case goes far beyond "playing old games in a browser." It reveals several important trends:
AI can now handle highly complex system-level engineering tasks. From cross-branch patch grafting, build toolchain configuration, and graphics API translation to binary file reverse extraction, this work spans some of the most challenging domains in software engineering. The conventional wisdom held that AI excels at pattern matching and code generation, while system-level engineering requires deep architectural understanding and cross-domain knowledge integration — this case shows that boundary is being breached.
AI's "full-stack" capability is becoming a reality. In this project, Fable simultaneously played the roles of reverse engineer, systems programmer, DevOps engineer, and graphics programmer. This kind of cross-domain comprehensive capability is beyond the reach of traditional tools. In human teams, these roles are typically filled by different specialists, and the communication and coordination between them is itself a massive cost. AI agents unify these capabilities within a single context, eliminating the overhead of cross-role communication.
Order-of-magnitude changes in development efficiency will reshape the economics of software development. When a "one-year project" is compressed to one hour, we need to rethink what the real bottleneck in software development is — perhaps it's no longer coding ability, but creativity and directional judgment. This is highly relevant to the long-standing discussion in software engineering about "essential complexity" versus "accidental complexity": AI is dramatically eliminating accidental complexity (toolchain configuration, API adaptation, boilerplate code), while essential complexity (product definition, architectural decisions, understanding user needs) still requires human intelligence.
Final Thoughts
The developer opened his post by writing, "I need to stop bothering you all with my game ports," but the community was clearly all for it. From Quake 1 to Quake 2 to RTCW, each port has been a test of the upper limits of AI coding tools.
The classic mp_beach map — that WWII Normandy landing scenario where you need to blow open a wall with dynamite and steal "ze sekret dokuments" — can now be relived directly in a browser with other players. mp_beach is the most iconic map in RTCW's multiplayer mode, inspired by the Omaha Beach landing at Normandy. In this map, the Allied team must land on the beach, blow open the seawall with explosives, navigate underground tunnels, and ultimately steal classified Axis documents. This map directly inspired the free standalone game Wolfenstein: Enemy Territory (2003), which became one of the early landmark titles in competitive FPS esports. mp_beach's objective-driven team cooperation design — engineers blowing walls, medics healing, lieutenants supplying ammo — defined the design language for the entire "class/squad" FPS subgenre that followed.
Technological progress sometimes works like this: it makes the once-impossible effortless, allowing us to re-experience the classics that defined an era in entirely new ways. And the rapid evolution of AI coding agents is turning "porting" — an engineering feat that once took months or even years — into an afternoon's improvisational creation.
Related articles

Turn AI Into Your Personal Tutor with /teach: A Complete Guide to Stateful Skill Design
Deep dive into the /teach AI Skill's design and engineering: stateful vs. stateless Skill selection, ZPD pedagogy, interactive lesson generation, and onboarding potential.

Apple Opens WWDC26 Developer Survey: How to Participate and Share Your Feedback
Apple has opened the WWDC26 developer survey, inviting global developers to share feedback. Learn about the survey's background, this year's AI highlights, and how to participate.

AI Large Language Model Learning Roadmap: A Systematic Path from Zero to Project Implementation
A detailed AI LLM learning roadmap covering Transformer architecture, Prompt Engineering, RAG, Agent development, model fine-tuning & deployment, with enterprise project guides.