npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@muhammedaksam/opentui-doom

v0.3.7

Published

Play DOOM in your terminal using OpenTUI's framebuffer rendering and doomgeneric WASM

Readme

npm version License: MIT TypeScript Bun Alacritty CI Mentioned in Awesome OpenTUI

DOOM for OpenTUI

🎮 Play DOOM in your terminal using OpenTUI's framebuffer rendering!

✨ Features

  • Full DOOM gameplay in your terminal
  • High-resolution rendering using half-block characters (▀) for 2x vertical resolution
  • Mouse aiming - Turn and fire with your mouse (enabled by default)
  • Keyboard input support with WASD and arrow keys
  • Save/Load game support - saves persist to ~/.opentui-doom/
  • Sound effects and music via mpv
  • WebAssembly powered - DOOM compiled to WASM via Emscripten

📋 Requirements

  • Bun - JavaScript runtime
  • Emscripten SDK - For compiling DOOM to WebAssembly
  • DOOM WAD file - Game data (shareware doom1.wad is freely available)

⚡ Quick Play (via npm)

If you have Bun installed, just download a doom1.wad and run:

bunx @muhammedaksam/opentui-doom --wad ./doom1.wad

🚀 Quick Start (Development)

1. Clone the Repository

git clone https://github.com/muhammedaksam/opentui-doom.git
cd opentui-doom
bun install

2. Install Emscripten (if not already installed)

git clone https://github.com/emscripten-core/emsdk.git ~/emsdk
cd ~/emsdk
./emsdk install latest
./emsdk activate latest
source ./emsdk_env.sh

3. Build DOOM WASM Module

bun run build:doom

This clones doomgeneric and compiles it to WebAssembly.

4. Get a WAD File

Download the shareware DOOM WAD:

Place the WAD file in the project root.

5. Run DOOM

bun run dev -- --wad ./doom1.wad

To disable mouse aiming:

bun run dev -- --wad ./doom1.wad --mouse false

Debug Mode

To run with debug logging enabled (outputs to debug.log):

bun run dev:debug -- --wad ./doom1.wad

🎮 Controls

| Action | Keys | | ----------------- | ------------------ | | Move Forward/Back | W / S or ↑ / ↓ | | Turn Left/Right | Mouse or ← / → | | Strafe | A / D | | Fire | Left Click or Ctrl | | Use/Open | Space | | Run | Shift | | Weapons | 1-7 | | Menu | Escape | | Map | Tab | | Quit | Ctrl+C |

💾 Save Games

Save games are stored in ~/.opentui-doom/ with DOOM's standard naming:

  • Slot 1: doomsav0.dsg
  • Slot 2: doomsav1.dsg
  • ... up to Slot 6: doomsav5.dsg

Saves are automatically synced every 5 seconds and on exit.

🔊 Sound

Sound effects and music require mpv to be installed:

# Ubuntu/Debian
sudo apt install mpv

# macOS
brew install mpv

# Arch
sudo pacman -S mpv

Sound files should be placed in the sound/ directory.

🖥️ Recommended Terminal Configuration

For the best experience, we recommend:

  • Alacritty terminal emulator
  • Font size: 5 (for maximum resolution)
  • Maximize your terminal window

⚠️ Known Limitations

  • Multi-key input: Terminals only send key repeat events for one key at a time. Holding W to move forward will stop when you press arrow keys to turn. This is a terminal limitation, not a bug.
  • No Kitty keyboard protocol: While OpenTUI supports the Kitty keyboard protocol for proper key release events, it didn't work as expected in my testing. Currently using timeout-based key release as a workaround.

🔧 How It Works

┌─────────────────┐    ┌──────────────────┐    ┌────────────────┐
│  doomgeneric    │───▶│  OpenTUI         │───▶│   Terminal     │
│  (WASM)         │    │  FrameBuffer     │    │   Display      │
└─────────────────┘    └──────────────────┘    └────────────────┘
         ▲                      │
         │                      │
         └──────────────────────┘
              Key Events
  1. DOOM runs as a WebAssembly module (compiled from C via Emscripten)
  2. Each frame, DOOM renders to a 1280x800 framebuffer
  3. OpenTUI reads the framebuffer and converts it to terminal cells using half-block characters
  4. Terminal keyboard input is mapped back to DOOM key codes

📁 Project Structure

opentui-doom/
├── src/
│   ├── index.ts          # Main entry point
│   ├── doom-engine.ts    # WASM module wrapper
│   ├── doom-input.ts     # Keyboard input mapping
│   └── doom-mouse.ts     # Mouse input handling
├── doom/
│   ├── doomgeneric_opentui.c  # Platform implementation
│   ├── doomgeneric/           # doomgeneric source (cloned during build)
│   └── build/                 # Compiled WASM output
├── scripts/
│   └── build-doom.sh     # Build script
├── package.json
└── README.md

📝 License

  • This project code: MIT
  • DOOM source code: GPL-2.0 (from id Software)
  • doomgeneric: GPL-2.0 (by ozkl)

🙏 Credits

🤝 Contributing

Contributions are welcome! Please submit pull requests to the develop branch.