- Category
- Entertainment
- Rank
- No. 2023Tools index
- Pricing
- Open Source
- Type
- GAME
- Builder
- badlogic
- GitHub
- 33 stars
- Date
About
Play DOOM in your terminal using the pi coding agent.
What it does
Pi Doom runs the doomgeneric engine inside a terminal through WebAssembly. It converts each frame into 24-bit colored half-block characters and maps terminal keystrokes to game controls. You can launch it inside pi with a command or run it as a standalone Node application.
Why it's ranked here
This is a focused, technically interesting extension with a complete playable loop: bundled game assets, terminal rendering, input handling, pause and resume, and standalone operation. Its narrow purpose and lack of sound limit broader utility, but the implementation clearly demonstrates how an interactive WebAssembly program can inhabit a text interface.
What's good
The repository bundles the WebAssembly module and shareware game data, reducing setup after cloning. Half-block rendering represents two vertical pixels per terminal cell while preserving separate 24-bit colors. The pi extension keeps the engine alive between sessions, so quitting to pi pauses the game and launching it again resumes progress.
Tradeoffs
The platform layer explicitly omits sound. Rendering repeatedly converts the full framebuffer into terminal escape sequences, so display quality and responsiveness depend on terminal size and 24-bit color support. Installation starts from a repository clone rather than a documented package command, and rebuilding the engine requires Emscripten plus a doomgeneric checkout.
How to use it well
Use it as a compact demonstration, terminal diversion, or reference for combining WebAssembly, terminal graphics, and interactive input. It best suits pi users and Node developers comfortable cloning a repository. Pick the extension mode when you want pause and resume inside pi, or standalone mode for direct play. It does not cover audio, graphical desktop play, or general game emulation.
Technical notes+
package.json defines an ES module package, declares @mariozechner/pi-tui as its dependency, publishes src, doom/build, and doom1.wad, and starts the standalone runner through tsx. src/doom-engine.ts loads generated Emscripten JavaScript with a dynamically constructed CommonJS wrapper, installs the WAD into the virtual filesystem, reads the ARGB framebuffer, and forwards key events. src/doom-component.ts drives a 35 Hz loop and emits ANSI true-color half-block cells. doom/doomgeneric_pi.c supplies the framebuffer, timing, and a 256-entry input queue without sound. doom/build.sh clones doomgeneric when absent and compiles it for Node with Emscripten.
Observed
- License
- GPL-2.0
- Primary language
- TypeScript, with a C platform adapter and shell build script
- Package format
- Node ES module package with npm install and npm start workflow
- Interfaces
- pi extension command and standalone terminal application
- Runtime assets
- WebAssembly build output and shareware WAD are included in the published file set
- Rendering
- ANSI 24-bit color using half-block terminal characters
- Platform layer
- Emscripten targets the Node environment and provides no sound
Read from README.md, package.json, src/index.ts, src/doom-keys.ts, src/standalone.ts, src/wad-finder.ts, src/doom-engine.ts, src/doom-component.ts, doom/doomgeneric_pi.c, doom/build.sh.
What it can do
Launch DOOM game in terminal
Terminal command → Running DOOM game instance
Render DOOM graphics in text-based interface
Game state data → ASCII/text-based visual display
Process keyboard input for game controls
Keyboard commands → Player movement and actions
Execute DOOM gameplay through coding agent
Game logic and user input → Interactive DOOM gaming experience
Run classic DOOM levels in terminal environment
Level selection → Playable DOOM level
Tags
Tech Stack
Comments (0)
No comments yet
Editorially curated, with community endorsements as a secondary signal. Corrections welcome.
