co-mono/packages/coding-agent/examples/extensions/doom-overlay
Mario Zechner 7af1919d31 fix: use portable shebang in shell scripts
Change #!/bin/bash to #!/usr/bin/env bash for better portability
on systems like NixOS where /bin/bash doesn't exist.

Fixes #910
2026-01-22 21:44:39 +01:00
..
doom fix: use portable shebang in shell scripts 2026-01-22 21:44:39 +01:00
.gitignore feat(tui): overlay positioning API with CSS-like values 2026-01-12 22:44:58 -08:00
doom-component.ts Don't force rerender in doom 2026-01-13 22:42:00 +01:00
doom-engine.ts feat(tui): overlay positioning API with CSS-like values 2026-01-12 22:44:58 -08:00
doom-keys.ts feat(tui): overlay positioning API with CSS-like values 2026-01-12 22:44:58 -08:00
index.ts feat(tui): overlay positioning API with CSS-like values 2026-01-12 22:44:58 -08:00
README.md feat(tui): overlay positioning API with CSS-like values 2026-01-12 22:44:58 -08:00
wad-finder.ts feat(tui): overlay positioning API with CSS-like values 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 width
  • maxHeight: "80%" - Maximum 80% of terminal height
  • anchor: "center" - Centered in terminal

Height is calculated from width to maintain DOOM's 3.2:1 aspect ratio (accounting for half-block rendering).

Credits