How Do Games Run in a Browser? Decompilation, Ports and Emulation
By Hugo Sequier · · Updated · 6 min read
A game runs in a browser tab because someone turned its code into something a browser can execute. There are three usual routes: decompilation, a source port or reimplementation, and emulation. All three usually finish in the same place, with C or C++ compiled to WebAssembly and drawn through WebGL or WebGPU. A fourth group skips the original code entirely: fan engines that rebuild a game, and the occasional official browser release.
Decompilation: rebuilding the source until it matches the ROM
A decompilation starts with a finished game binary and works backwards. The team splits the ROM into functions, gives them readable names, rewrites each one in C, and compiles the result, which has to match the original byte for byte. The Super Mario 64 decompilation ships builds for five releases and lists the SHA1 hash each one must produce.
The same repository explains the catch that shapes this whole world: it "does not include all assets necessary for compiling the ROMs. A prior copy of the game is required to extract the assets." Code can be rebuilt from analysis. Art, music and level data cannot, so they get pulled from a copy you already own.
Super Mario 64's decompilation led to an unofficial PC port in 2020, which Nintendo had removed with copyright complaints within days, as GameSpot reported. The code survived. The download links did not.
The Ocarina of Time decompilation is a slower, still unfinished version of the same idea. It says it "is not producing a PC port"; separate projects use that work. One of them, Ship of Harkinian, states that "The Ship does not include any copyrighted assets. You are required to provide a supported copy of the game." Rare's N64 shooter went the same way: a build of the Perfect Dark decompilation, compiled to WebAssembly with clean-room assets, lets you play Perfect Dark in your browser without the original game files.
Source ports and reimplementations: new code, same behaviour
A source port takes engine code and makes it run somewhere new. A reimplementation writes fresh code that behaves like the original, sometimes without looking at the original source, which is where the term clean room comes from.
The re3 and reVC projects reverse-engineered the code behind GTA III and Vice City so modders could build on it. GamesIndustry.biz reported that a DMCA notice attributed to Take-Two appeared on the repositories in 2021, and noted one reason the project was exposed: it "did use PC game assets, so players needed to own a copy of GTA 3 in order to use it." The browser Vice City WASM port we list is reVC compiled to WebAssembly.
Other long-running examples:
- DevilutionX is "a port of Diablo and Hellfire" that needs
DIABDAT.MPQfrom your own copy, or the free sharewarespawn.mpq. That is how Diablo can run in a tab today. - OpenRCT2 calls itself an "open source re-implementation of RollerCoaster Tycoon 2" and needs "the object files (containing graphics, sounds and models) from the original" game.
- Xash3D FWGS is an engine built to stay compatible with Half-Life. The browser Half-Life loads prepared Half-Life and Opposing Force packages or a zip of your own files.
Emulation: bring the whole old machine
Emulation skips the rewrite. You build a virtual 486 or PlayStation in software, load the original game into it, and let the game run unchanged. In a browser that means an emulator compiled to WebAssembly.
DOSBox is the classic DOS emulator, and js-dos wraps emulators in a browser player with a small JavaScript API. The js-dos documentation shows it mounting remote disk images from dos.zone over a WebSocket drive, which is how a site can serve a large DOS game without stuffing it into one download. DOS Zone uses both shapes. Its Age of Empires II boots Windows from such a remote disk, while its Doom arrives as one 5.5 MB zip holding the original DOS files, which we opened on 20 November 2026. Every DOS Zone listing we track was down on 3 November 2026 and back by 12 November.
Other emulated listings run on the Internet Archive, which boots the original DOS release in its own browser emulator: SimCity 2000 and Dungeon Keeper are two examples, with nothing to download and no file to supply. DOS releases from both hosts are on our page of MS-DOS browser games.
What runs on browsergame.si, by route
Our own play counter shows which routes people actually use. These are plays from 9 to 31 October 2026 for listings that were still live on 3 November 2026, taken from our most-played table, grouped by how each game's guide describes it.
| Route | Game | How it runs | October plays |
|---|---|---|---|
| Fan engine or rebuild | Skate 3 | Unofficial fan engine on WebGPU | 32,415 |
| Decompilation | Call of Duty: Black Ops Zombies | Decompiled Black Ops 1 engine code | 13,663 |
| Source port | The Simpsons: Hit & Run | PC version ported from leaked source to WebAssembly | 8,252 |
| Reimplementation | GTA: Vice City WASM Port | reVC compiled to WebAssembly | 6,210 |
| Official | Minecraft Classic | Mojang's own browser build | 3,786 |
| Source port | Minecraft 1.8.8 (EaglercraftX) | Java Edition compiled with TeaVM | 2,740 |
| Decompilation | Halo: Combat Evolved | OpenCE, a decompilation of the Xbox build | 2,550 |
| Reimplementation | GTA III (WASM Arcade) | re3 compiled to WebAssembly | 2,150 |
| Fan engine or rebuild | Skate × Rust | Fan game on the MW2 Rust map | 1,899 |
| Fan engine or rebuild | Surfd | Standalone rebuild of Source surf movement | 1,803 |
| Fan engine or rebuild | Crash Bash | Unofficial port of the PlayStation game; its host says it is not an emulator | 1,028 |
| Reimplementation | Half-Life | Xash3D FWGS, prepared packages or your own files | 1,020 |
Emulated games used to rank higher: Doom, Resident Evil, Mortal Kombat Trilogy and The Need for Speed were all in our October top 20, and all ran on DOS Zone, which was offline for us on 3 November 2026 and back by 12 November.
From C++ to the tab: Emscripten, WebAssembly, WebGL and WebGPU
Nearly every route ends at the same toolchain. Emscripten "is a complete Open Source compiler toolchain to WebAssembly" that turns C and C++ into WebAssembly using LLVM, plus a little JavaScript to connect it to the page. It also supplies the pieces games expect, including SDL2 for input and audio and OpenGL ES style graphics calls.
WebAssembly is the target: "a binary instruction format for a stack-based virtual machine", designed as a portable compilation target and run inside a sandbox that follows the browser's security rules.
Drawing is the other half. WebGL is a JavaScript binding to OpenGL ES 2.0 and has been around since 2011. WebGPU is its successor, with better access to modern GPUs, cheaper draw calls and compute shaders. The newest browser ports, including Skate 3, require WebGPU.
Browsers still have limits that show up in ports. A page cannot open a raw UDP socket, so browser multiplayer gets tunnelled over WebSockets, usually through a small relay server.
Why some ports need your own game files
The split is always code versus content. A port ships its own engine code, not the textures, models, music and levels that make the game recognisable, so it reads those from a file you supply.
That is the whole reason Super Mario 64 wants a baserom, OpenRCT2 wants RCT2 object files, Ship of Harkinian wants a supported ROM, and DevilutionX wants an MPQ. Some projects go further and avoid shipping anything retail at all: Clean Room Skate Online runs the Skate 3 Rust engine with a pack where every texture, sound and mesh was regenerated.
The 2026 wave: AI made decompilation faster
The recent burst of browser ports is not a coincidence. Polygon puts it simply: a new version of Claude means "modders can decompile games ... much faster than before", and AI tools help with the port itself. Halo: Combat Evolved was decompiled for the first time, and its browser build drew nearly 20,000 plays in five hours, according to TechPowerUp.
Polygon also notes that AI-assisted ports are more likely to be buggy. Speed makes it easier to ship a project built on copied assets too, and Activision took the Call of Duty browser ports down within days of them going viral. The surviving zombies project is on our Black Ops Zombies game page, and every live game in the table above is in the full browsergame.si catalogue.
FAQ
Is reverse engineering a game legal?
This is not legal advice. Ports that require your own game files keep the original content out of the download, but publishers still decide whether a project stays up. Nintendo, Take-Two and Activision have all been linked to takedowns at different points.
Why does a browser port take so long to load?
Two reasons: the engine and assets download, and shaders compile for your GPU. Big 3D ports often load a data pack before the first frame, so the first visit is the slowest.