Skip to content

Play the examples

The two game templates and the smallest example, built and hosted right here. Each one opens in a new tab as the shipping build: the game's TypeScript compiled to a WebAssembly component, running in the wasm sandbox on a WebGPU renderer. Nothing to install.

You need a WebGPU browser

Chrome or Edge 121+ on a desktop. Splat worlds fall back to WebGL, but the physics and the guest still need a current browser. If a game shows a pink error instead of a world, Troubleshooting has the symptom list.

First-person shooter

A splat arena, three capsule enemies, a hitscan weapon, ammo and health pickups, a HUD and a win condition. The fps template with zero edits.

templates/fpswasm sandbox

click to play · WASD move · space jump · mouse aim · LMB fire · R reload

Third-person adventure

A follow camera, locomotion states, a guide NPC you can talk to, and interactables with two-choice dialogue. The third-person template with zero edits.

templates/third-personwasm sandbox

click to play · WASD move · shift run · space jump · mouse orbit · E interact · 1/2 answer

wasm-hello

The smallest complete game: one cube, driven from a forty-line guest with no assets, no physics and no manifest. A HUD counts the frames. What the wasm boundary looks like with nothing else in the way.

examples/wasm-hellowasm sandbox

nothing to press — watch the cube

How they get here

npm run docs:games runs each game's production build with a base of /play/<name>/ and writes it to docs/public/play/<name>/, which VitePress serves verbatim. The output is generated and gitignored, like docs/api/, so a fresh checkout runs it once before docs:dev or docs:build:

sh
npm run docs:api
npm run docs:games
npm run docs:dev

docs:games fps builds one game; docs:games --clean starts over. The list of hosted games lives in tools/docs/build-games.mjs, next to the build.

Each hosted game is the same vite build the template's own npm run build runs — the componentized guest and all — so what you play here is exactly what npm run preview in that directory serves.