Skip to content

Demos ​

Every demo below is the same .wasm file you can also run natively with gasm-run. It runs here in the browser runner, which is gasm's JavaScript host with WebGPU for 3D.

Sumo (3D)Push the other ball off the platform. Arrows move, X or Z dashes. Plays a bot, or a friend online through a relay.GPU triangleThe smallest gasm:gfx program: one shader, one vertex buffer, about 50 lines of Rust.GPU texturesMipmapped textures, two samplers, shared bind groups, dynamic offsets and instancing, pillarboxed to 4:3. Type to tint the quad.Input testerEverything a game can read: keys (with modifiers), mouse position, wheel and motion, gamepads and joysticks.NES emulatortetanes-core compiled to wasm. Open or drop your own .nes file; nothing is uploaded.ScummVMBeneath a Steel Sky (freeware) in ScummVM, saves included. Open a folder with your own adventure games.DOOMThe shareware episode, with AdLib music and saves. Drop your own .wad (DOOM II, Freedoom, ...) to play that instead.SDL 3: snakeSDL 3's snake demo, source unchanged, on SDL for gasm. Arrows steer, R restarts.SDL 3: woodeneye-008SDL 3's tiny shooter, unchanged: click the game for mouselook, WASD moves, Space jumps, click shoots.SDL 3: threadsSDL_CreateThread, timers, mutexes and conditions on gasm's cooperative threads: deterministic, on one wasm thread.OpenGL ES 3 (C)GLES 3 code through the SDK's drop-in headers on gasm:gl: instancing, a uniform block, render to texture, a mapped buffer. Needs WebGL 2.egui (Rust)egui's own demo windows through egui_glow, unchanged, on gasm:gl via glow. Click, scroll and type.Game data in OPFSImport a folder (a mounted CD) into this site's private storage once, using csfs; games then read it on demand in a Worker.Test pattern (C)An 80-line C game built with wasi-sdk: gradient, movable square, a tone while A is held.

Godot ​

Godot 4.7 runs on gasm with the Compatibility renderer on gasm:gl: one engine module, and each game is a .pck exported by the Godot editor (how). Each example shows one part of the engine:

DOOM ​

DOOM runs everywhere, so it had to run on gasm. doom.wasm is doomgeneric compiled with wasi-sdk, with Chocolate Doom's OPL music player, and the demo plays the shareware episode with DOOM's own keys: arrows move, Ctrl fires, Space opens doors, Shift runs, Alt strafes, 1–7 pick weapons, Esc opens the menu. Click the game to play with the mouse. Gamepads work too. Saves stay in your browser. Press start in the frame (it loads the 4 MB WAD).

doom.wasm is licensed under the GNU GPL version 2. Its complete source is here and in every release. The shareware doom1.wad is freely distributable, courtesy of id Software.

ScummVM ​

scummvm.wasm is ScummVM with a gasm backend. Its engines run their own loops, so the module pauses and resumes them every frame with Binaryen's Asyncify, inside the guest. The demo plays Beneath a Steel Sky, freeware from Revolution Software: click to walk and act, Esc skips the intro, Ctrl+F5 opens ScummVM's menu (save, load). Open folder… in the player runs your own games: the LucasArts SCUMM games (Monkey Island, Day of the Tentacle, Sam & Max, Full Throttle, The Dig, ...), Humongous games and Drascula work, with compressed speech and music (MP3, Ogg Vorbis, FLAC). What is and isn't ported yet: porting status.

scummvm.wasm is licensed under the GNU GPL version 3. Its complete source is here and in every release.

SDL 3 ​

SDL 3 for gasm runs SDL programs with their source unchanged. These are SDL's own demos (examples/demo in SDL), compiled against it: video through SDL's software renderer, keyboard, mouse (relative mode for woodeneye's mouselook), gamepads, audio and files map onto the gasm ABI. Snake: arrows steer. woodeneye-008: click the game to capture the mouse, WASD moves, Space jumps, click shoots.

SDL is zlib-licensed; the demos are public domain.

Try sumo right here ​

Click into the frame to give it keyboard focus. Arrows move; X or Z dashes. A gamepad works too. Needs a browser with WebGPU (Chrome, Edge, Safari 26+, Firefox 141+ on Windows).

Play sumo online ​

Online play needs a relay, a tiny WebSocket server that pairs players in rooms. This site is static, so it doesn't include one. Run your own:

sh
git clone https://github.com/emdzej/gasm && cd gasm && make
runners/native/target/release/gasm-relay 0.0.0.0:9000

Both players open the sumo demo, enter the relay URL and the same room name, and press start. Native players join with gasm-run build/sumo.wasm --allow-net --param relay=ws://HOST:9000 --param room=NAME.

HTTPS pages need wss://

This site is served over HTTPS, so browsers only allow wss:// relays from it. Give gasm-relay a certificate (--tls-cert fullchain.pem --tls-key privkey.pem) or put it behind a TLS proxy (for example Caddy: reverse_proxy localhost:9000). Alternatively, run the web runner locally with make web, which works with plain ws://.

Run the demos locally ​

sh
make && make roms && make web
# http://localhost:8080/runners/web/  (includes test ROMs and homebrew for the NES demo)

MIT licensed. The NES demo core is tetanes-core (MIT/Apache-2.0).