mirror of
https://github.com/earendil-works/pi.git
synced 2026-06-18 15:54:04 +08:00
..
2026-04-05 01:07:34 +02:00
2026-01-12 22:44:58 -08:00
2026-05-20 12:46:17 +02:00
2026-01-12 22:44:58 -08:00
2026-05-07 15:59:42 +02:00
2026-06-01 18:32:03 +02:00
2026-01-12 22:44:58 -08:00
2026-01-12 22:44:58 -08:00
DOOM Overlay Demo
Play DOOM as an overlay in pi. Demonstrates that the overlay system can handle real-time game rendering at 35 FPS.
Usage
pi --extension ./examples/extensions/doom-overlay
Then run:
/doom-overlay
The shareware WAD file (~4MB) is auto-downloaded on first run.
Controls
| Action | Keys |
|---|---|
| Move | WASD or Arrow Keys |
| Run | Shift + WASD |
| Fire | F or Ctrl |
| Use/Open | Space |
| Weapons | 1-7 |
| Map | Tab |
| Menu | Escape |
| Pause/Quit | Q |
How It Works
DOOM runs as WebAssembly compiled from doomgeneric. Each frame is rendered using half-block characters (▀) with 24-bit color, where the top pixel is the foreground color and the bottom pixel is the background color.
The overlay uses:
width: "90%"- 90% of terminal widthmaxHeight: "80%"- Maximum 80% of terminal heightanchor: "center"- Centered in terminal
Height is calculated from width to maintain DOOM's 3.2:1 aspect ratio (accounting for half-block rendering).
Credits
- id Software for the original DOOM
- doomgeneric for the portable DOOM implementation
- pi-doom for the original pi integration