qwasm2-rs

The Quake II engine, rewritten in Rust and running in your browser on WebAssembly, WebGL 2 and WebAudio.

Starting the demo downloads about 50 MB: id Software's unmodified demo pak0.pak, under the Quake II demo license. Needs WebGL 2. Click the game to capture the mouse; WASD moves, the mouse aims and fires, the number keys choose weapons.

What runs today

Alpha. The browser loads a map from real Quake II game data into an in-process server running the game logic. Expect breaking changes.

Run it locally

git clone https://github.com/athola/qwasm2-rs.git
cd qwasm2-rs
make play

make play builds the WebAssembly module, downloads the free Quake II demo data if it is missing, and serves the game at http://127.0.0.1:8080/qwasm2.html. The repository README lists the prerequisites and the page's URL settings.

How it's built

A 14-crate Cargo workspace with a strict dependency graph. Rust traits (Renderer, GameImport, GameExport, PakReader) replace the C function-pointer tables. The network protocol is C protocol 34, byte for byte, and physics follows C's float and double precision so client prediction can match the server. It is a port of the C of Qwasm2 (Yamagi Quake II), checked against that source; the design records are in the repository's ADRs.