dino-runner-cli
v0.2.4
Published
A fast-paced terminal-based endless runner game inspired by the Chrome dinosaur game! Built with TypeScript and Node.js. Navigate through obstacles, collect points, and see how long you can survive as the difficulty increases!
Maintainers
Readme
🦖 Dino Runner CLI
A fast-paced terminal-based endless runner game inspired by the Chrome dinosaur game! Built with TypeScript and Node.js. Navigate through obstacles, collect points, and see how long you can survive as the difficulty increases!
🎮 Game Preview
___▐____________________g__________y________________⍘ | Score: 15 | Lvl: 2
___▌___________________g__________y________________⍘_ | Score: 15 | Lvl: 2
___▐__________________g__________y________________⍘__ | Score: 15 | Lvl: 2🚀 Quick Start
Github: https://github.com/Oaxoa/dino-runner-cli NPM: https://www.npmjs.com/package/dino-runner-cli
Play Instantly (Recommended)
npx dino-runner-cliOr Install Globally
npm install -g dino-runner-cli
dino-runner-cli🎯 How to Play
- ↑ (Up Arrow): Jump over ground obstacles (
g,y) - ↓ (Down Arrow): Duck under overhead obstacles (
⍘) - Ctrl+C: Quit the game
Game Elements
▌▐: Your character (alternates while running)g,y: Ground obstacles (jump over these)⍘: Overhead obstacles (duck under these)_: Safe ground
Scoring
- +1 point for each obstacle you successfully avoid
- Level increases every 64 steps, making the game faster and more challenging
- Game Over when you hit an obstacle
🛠️ Development
Prerequisites
- Bun runtime
- Node.js (for npx distribution)
Local Development
# Install dependencies
bun install
# Run in development mode
bun run index.ts
# Build for distribution
npm run build
# Test the built version locally
npm link
npx dino-runner-cli🎨 Game Features
- Endless Runner: Procedurally generated obstacles
- Progressive Difficulty: Game speed increases with your score
- Smooth Animation: 50ms frame rate for fluid gameplay
- Responsive Controls: Instant response to arrow key inputs
- Score Tracking: Real-time score and level display
- Cross-Platform: Works on any terminal that supports ANSI escape codes
🏗️ Technical Details
Built with:
- TypeScript for type-safe game logic
- Node.js process APIs for terminal control
- Bun for fast development and building
- npm for package distribution
The game uses raw terminal input mode to capture arrow keys and renders using ANSI escape sequences for smooth animation.
📦 Publishing
This package is designed to be distributed via npm and run with npx. The build process:
- TypeScript source is compiled to JavaScript
- Shebang (
#!/usr/bin/env node) is added for CLI execution - Package is configured with proper
binentry point
🤝 Contributing
Feel free to submit issues and pull requests! Some ideas for contributions:
📄 License
MIT License - see package.json for details
👨💻 Author
Pierluigi Pesenti ([email protected])
