pi-pac-man
Pac-Man extension for Pi
Package details
Install pi-pac-man from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-pac-man- Package
pi-pac-man- Version
0.1.0- Published
- Jun 7, 2026
- Downloads
- not available
- Author
- shivam0110
- License
- MIT
- Types
- extension
- Size
- 19.2 KB
- Dependencies
- 0 dependencies · 2 peers
Pi manifest JSON
{
"extensions": [
"./extensions/index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-pac-man
Play a terminal-native Pac-Man game inside Pi.
pi-pac-man adds a persistent TUI overlay opened with /pac-man. You move Pac-Man through multi-level ASCII mazes while four local ghosts chase, scatter, and flee deterministically.
Features
- Centered terminal overlay, built with Pi TUI
- Three larger levels
- Four named ghosts: Blinky, Pinky, Inky, and Clyde
- Pellets, power pellets, frightened ghosts, lives, scoring, and level clears
- Arrow-key and WASD input
- Session persistence across Pi reloads/resumes
- Validated saved state, wall collision checks, and deterministic rules
- TypeScript source, no build step required
- Manual npm publish workflow included
Install
pi install npm:pi-pac-man
Or add it to ~/.pi/agent/settings.json:
{
"packages": ["npm:pi-pac-man"]
}
Usage
Start or resume a game:
/pac-man
Start a fresh game:
/pac-man new
Controls
| Key | Action |
|---|---|
| Arrow keys | Move Pac-Man |
W A S D |
Move Pac-Man |
n |
New game |
q |
Close overlay |
The overlay is TUI-only. It will not open in Pi print, JSON, or RPC modes.
Symbols
| Symbol | Meaning |
|---|---|
Green P |
Pac-Man |
Red B K I C |
Dangerous ghosts |
Blue g |
Frightened ghost |
. |
Pellet |
o |
Power pellet |
# |
Wall |
Development
npm install
npm test
npm run check
Try the extension locally:
pi -e ./extensions/index.ts
Then run:
/pac-man
Package Notes
Pi loads TypeScript extensions directly, so this package publishes the source .ts files. Pi core packages are declared as peer dependencies to avoid bundling duplicate Pi runtime packages.
License
MIT