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

gametui

v0.1.27

Published

A terminal platformer built with Bun and OpenTUI.

Readme

gametui

A tiny terminal platformer prototype built with Bun and OpenTUI.

The world is procedurally generated from a fixed seed and loaded in chunks. This gives us deterministic terrain for future multiplayer: every client can derive the same base world from the same realm id and seed, while player edits can be synced later.

Run it with:

bun install
bun run dev

Run from npm once published:

bunx gametui
npx gametui

Join a named world by passing the world name as the first positional argument:

bunx gametui Ryan-World
npx gametui Dax-World

Named worlds all use the same server, but each name maps to an isolated multiplayer room and deterministic world seed. Rejoining the same world name generates the same terrain; different names generate different worlds.

The default main world is superflat. World names beginning with superflat also generate flat terrain, for example:

bunx gametui superflat
bunx gametui superflat-ryan

gametui uses Bun at runtime, so bun must be installed and available on your PATH.

Each install keeps a stable local client id in ~/.config/gametui/game.json so reconnecting does not create duplicate player ghosts.

By default the client connects to the shared multiplayer server:

wss://gametui.raavcorp.com/rooms/main

Use a different server or run offline with:

gametui --server ws://localhost:47921/rooms/main
gametui Ryan-World --server ws://localhost:47921/rooms/main
gametui --offline
gametui -v

Controls:

  • Left/right arrows or A/D: move
  • Up arrow, W, or Space: jump (press again in air for double jump)
  • Up/down arrows or W/S: climb ladders
  • Down arrow or S: fast fall
  • 1-0: select a hotbar block
  • 0: selects a brown transparent door block you can walk through
  • F: fire one bullet per second in the direction you last moved; getting hit flashes the terminal red
  • T: teleport to the current mouse cursor position if the target is safe and within 500 blocks
  • G: open the X-position teleport modal; entering X moves you 20 blocks above that ground level, clamped to 500 blocks from your current X
  • L: spawn falling lava at the mouse cursor if available (30 second cooldown)
  • Left-click solid blocks: mine/damage them until they break
  • Right-click empty sky: place the selected hotbar block; hold and drag to paint blocks
  • C: cycle your player icon
  • R: reset player (20 second cooldown)
  • Q or Escape: quit

The HUD shows the current multiplayer connection status, off-screen player direction counts, and a top-right player roster in five-row columns. Respawns are randomized, lava sinks away after 10 seconds, and the camera follows vertical movement only near the top/bottom viewport edges to avoid bounce.

The player is the one-cell triangle glyph . Resizing the terminal changes how much of the world is visible, not the scale of the world or character. The vertical camera is anchored so jumping moves the character instead of moving the whole ground line.

On launch, the game asks for your name and saves it to:

~/.config/gametui/game.json

If a name is already saved, the game starts without prompting. To clear the saved name and answer again, run:

bun run dev -- --clear

The config also stores your last position per world name and restores it when you rejoin that same world.

World model:

  • Default game seed: 0x1a11a6a
  • Chunk width: 64 cells
  • Current realm: overworld
  • Named worlds derive their own deterministic seed from the world name while staying consistent for all players in that room.
  • main and superflat* worlds use the same room/seed model with flat terrain generation.

Multiplayer Server

The Dockerized Bun WebSocket server lives in server/. It owns the shared seed, rooms, player snapshots, falling block physics, lava cells, tile ops, and block spawn ops. The OpenTUI client keeps deterministic terrain generation locally and applies the server's shared mutations.

Run locally:

bun run server:dev

Health check:

curl http://localhost:47921/health

WebSocket room URL:

ws://localhost:47921/rooms/main

Build/run with Docker:

docker build -f server/Dockerfile -t gametui-server .
docker run --rm -p 47921:47921 -v gametui-data:/data gametui-server

Run persistently with Docker Compose:

docker compose up -d --build

The shared server is proxied at:

https://gametui.raavcorp.com
wss://gametui.raavcorp.com/rooms/main

Server persistence defaults to:

/data/game-state.json