Interactive Demos
Demos running in the browser via WebAssembly.
| Example | Headless | Terminal | Software | WebGL | WebGPU |
|---|---|---|---|---|---|
| 01_hello_world | Run | Run | Run | Run | Run |
| 02_colors | Run | Run | Run | Run | Run |
| 03_keyboard | Run | Run | Run | Run | Run |
| 04_mouse | Run | Run | Run | Run | Run |
| 05_layout_grid | Run | Run | Run | Run | Run |
| 06_layers | Run | Run | Run | Run | Run |
| 07_sprites_tileset | Run | Run | Run | Run | Run |
| 08_animation | Run | Run | Run | Run | Run |
| 09_widgets_dashboard | Run | Run | Run | Run | Run |
| 10_widgets_interaction | Run | Run | Run | Run | Run |
| 11_sokoban | Run | Run | Run | Run | Run |
| 12_dungeon_scroll | Run | Run | Run | Run | Run |
| 13_combat_log | Run | Run | Run | Run | Run |
| 14_resize | Run | Run | Run | Run | Run |
| 15_outpost_dashboard | Run | Run | Run | Run | Run |
| 16_subcell_image | Run | Run | Run | Run | Run |
| 17_theme_switch | Run | Run | Run | Run | Run |
| 18_text_align | Run | Run | Run | Run | Run |
| 19_weighted_fill | Run | Run | Run | Run | Run |
| 20_overworld | Run | Run | Run | Run | Run |
| 21_text_input | Run | Run | Run | Run | Run |
| 22_random_tiles | Run | Run | Run | Run | Run |
Headless renders as plain text (a fixed-size character grid, no canvas) —
the same Headless backend used in tests, driven here by a browser
requestAnimationFrame loop and an on-screen button toolbar.
Terminal (via xterm.js) renders real
ANSI/SGR escape codes — the same terminal-family renderer the native
crossterm backend uses.
Software is the CPU-rasterized pixel backend, rendered to a
<canvas>.
WebGL is the GPU backend (retroglyph-gl) running on WebGL2 —
the same instanced-quad renderer the native OpenGL 3.3 backend uses, rendered to a
<canvas>.
WebGPU is the newer GPU backend (retroglyph-wgpu), the same
one that runs on Vulkan, Metal and D3D12 natively. It needs a browser with WebGPU
(Chrome/Edge 113+, Safari 26+, or Firefox with dom.webgpu.enabled) and says so
rather than showing a blank page if that's missing; it also starts blank for a moment while
it acquires a device asynchronously. Every example gets all five variants (see
tools/build-wasm-examples.sh) — there's no per-example backend list to keep
in sync.