About Dusty Bytes
Classic games, preserved and playable in your browser.
What is this?
Dusty Bytes is a browser-based retro gaming platform. Classic PC games from the 90s — compiled to WebAssembly and running natively in your browser. No downloads, no plugins, no emulators. Just open a URL and play.
Each game runs using its open-source engine reimplementation, compiled to WebAssembly so that it can run directly in the browser. The original game data (shareware and demo editions) provides the assets. The platform shell handles rendering, audio, input, and save persistence — the games think they're running on native hardware.
Architecture
The platform runs entirely in your browser — there is no game server. Each game engine is compiled to WebAssembly and runs inside an isolated Web Worker thread. The main browser thread handles all input, rendering, and audio, while the Worker handles game logic. The two communicate through a message-passing bridge — the game engine never touches the DOM directly.
This message-passing architecture provides complete isolation — a crash in one game engine cannot affect the browser tab. Frame data is sent as transferable ArrayBuffers for zero-copy performance. The platform shell is game-agnostic: the same rendering, audio, and input code serves all four engines.
All four engines use the same threading model: ASYNCIFY cooperative yielding on the Emscripten main thread inside their Worker. The game's realtime callbacks (audio fill, render, input pumps) run synchronously; any blocking call (event waits, frame sleeps) yields control back to the Emscripten runtime so the rest of the WASM module keeps making progress. No engine uses native pthreads or SharedArrayBuffer.
How games are loaded
- Assets are fetched and cached in the browser's Origin Private File System (OPFS) — downloaded once, then served locally on subsequent visits.
- Game engines (WASM + JS glue) are loaded as Web Workers with a compatibility layer that bridges the game engine's native API calls to browser APIs.
- User-supplied game data: if you own a full copy of a supported game, you can upload the data files from your CD or digital purchase. They land in OPFS on your device — nothing leaves your browser.
- Saves persist via Emscripten's IDBFS — backed by IndexedDB. Your progress survives page refreshes and browser restarts.
How it works
Full versions, disk to engine, Diablo as the example.
1. OPFS — the browser's private filesystem. When you drop DIABDAT.MPQ on the upload area, your browser stores it in the Origin Private File System (OPFS). OPFS is a sandboxed storage area bound to dustybytes alone — no other site can read it, and the file never crosses the network. The bytes live in your browser profile, keyed under /user-games/diablo-full/DIABDAT.MPQ.
2. Main thread reads OPFS. When you click Play, the platform's main JavaScript thread opens the file from OPFS and reads it into an ArrayBuffer.
3. Zero-copy to the engine's Web Worker. The game engine runs in a separate thread — a Web Worker — to keep the main UI responsive. We hand the buffer over using the structured-clone transfer protocol, which moves ownership of the underlying memory rather than copying it. For a 493 MB file, that's a meaningful win.
4. Emscripten MEMFS — a virtual filesystem in RAM. Inside the worker, the engine is C++ code compiled to WebAssembly via Emscripten. Emscripten provides a virtual filesystem called MEMFS — essentially a tmpfs that lives in the WASM module's linear memory. We write the bytes to MEMFS at the path the engine expects (/DIABDAT.MPQ for devilutionX).
5. WASM reads MEMFS as if it were disk. From the engine's point of view, MEMFS is just a filesystem with files. It calls fopen() / fread() like it would on Windows or Linux, and the WASM runtime routes those calls into MEMFS. The C++ code is unchanged from its desktop original — it has no idea it's running in a browser.
Saves work in reverse. When the engine writes save files, those go to IDBFS, an Emscripten filesystem backed by your browser's IndexedDB. That persists across refreshes — so your save survives.
Why this design
- Privacy. Your files never reach our servers. We don't have an account system because there's nothing for an account to hold. The only network traffic is fetching the engine binary itself and the shareware demo data.
- Performance. MEMFS reads compile to plain WASM memory accesses — faster than hitting a real disk. Game start time isn't bottlenecked by the filesystem.
- Faithfulness. The engine code paths are the same ones that ran on PCs in the late '90s. devilutionX, fallout1-ce, xash3d-fwgs, and stratagus/wargus are mature reimplementations of those originals — we just retarget them to WebAssembly.
Input + Mobile
On desktop, keyboard and mouse events are captured, serialized, and forwarded to the Worker. On mobile, a configurable touch control system translates gestures into game inputs:
- Tap to click, long-press for right-click
- Virtual joystick for movement-based games
- Configurable overlay buttons per game
- Automatic fullscreen + landscape orientation lock
Networking
Every game runs entirely client-side — there is no game server, no matchmaking, no cloud sync. Each browser tab is its own self-contained universe. Adding multiplayer would mean building a unified networking stack across all four engines (likely WebRTC for peer-to-peer, with a small signaling server for player discovery). That's on the wishlist; not built yet. For now, every game is single-player.
Tech Stack
- Frontend: Vanilla JavaScript — no frameworks, no TypeScript, no build tools
- Rendering: Software rendering via
putImageDataon a<canvas> - Audio: Web Audio API with gain control and buffer scheduling
- Storage: OPFS for assets, IndexedDB (IDBFS) for saves
- Threading: All four engines use ASYNCIFY cooperative yielding on the Emscripten main thread inside their Worker — no native pthreads, no SharedArrayBuffer
- Hosting: Static files — deployable to any CDN (Cloudflare Pages, Netlify, etc.)
Engine Attribution
Each game runs through an open-source engine reimplementation. We maintain Emscripten/WASM forks with minimal patches on top of the upstream projects. Full patch history is available in the fork branches linked below. Engines are listed in release order of the games they power.
Game Data Ownership
Dusty Bytes ships only freely distributable demo and shareware editions of game data — official releases that the original publishers made available at no cost:
- Warcraft II: Blizzard's official Tides of Darkness shareware demo
- Diablo: Blizzard's official shareware release (
spawn.mpq) - Fallout: Interplay's official 1997 combat demo
- Half-Life: Valve's official Uplink demo (
pak0.PAK)
No full-game copyrighted data is hosted or distributed. If you own a full copy of these games, the platform can load it locally — your files never leave your device.
Privacy
Dusty Bytes has no accounts and no sign-up — there's nothing to register for. We don't currently run analytics or tracking scripts of any kind.
Full-game data you upload (Diablo's DIABDAT.MPQ, Fallout's master.dat, etc.) is written to your browser's Origin Private File System (OPFS) and never leaves your device — it is not uploaded to any server. Save games persist locally in your browser via IndexedDB. If that changes — for example, if we add privacy-respecting analytics like Cloudflare Analytics — this section will be updated to reflect it.
Trademarks
Dusty Bytes is an independent project. Not affiliated with, endorsed by, or sponsored by Blizzard Entertainment, Valve Corporation, Interplay Entertainment, or any other publisher mentioned. All trademarks, game titles, character names, and brand assets are the property of their respective owners.
DMCA / Copyright
If you believe content on this platform infringes your copyright, please send a notice to contact@dustybytes.com. Include: the copyrighted work at issue, the allegedly infringing URL, your contact information, and a statement of good faith belief.