terminal-invaders
v1.0.3
Published
A retro-style Space Invaders game for the terminal using Braille graphics.
Maintainers
Readme
Terminal Invaders
Installation
Install from package
npm i terminal-invaders
npx terminal-invadersor
npm install -g terminal-invadersInstall from source (bash)
git clone "https://github.com/Dru-429/Terminal-invaders"
cd Terminal-invaders
npm install terminal-kit drawille-canvas figletControls
| Key | Action | |---|---| | Left Arrow | Move ship left | | Right Arrow | Move ship right | | Spacebar | Shoot bullet | | R | Restart game after game over | | CTRL+C | Quit application |
Overview
Terminal Invaders is a retro-style shooter built 100% for the command line. It uses Braille-character rendering to achieve higher visual fidelity within a text console, delivering smooth pixel-like animation in a terminal window.
Aliens, bullets, and the player ship are drawn on layered drawille canvases and composited together with colorful terminal-kit output. This is a nostalgic Space Invaders clone with modern Node.js tooling for an immediate plug-and-play CLI experience.
Features
- High-fidelity sprite designs: a custom X-Wing player ship and classic Space Invader monster variants rendered in Braille dots.
- Multi-layered color rendering:
- Green ship
- Red aliens
- Yellow bullets
using
terminal-kitfor rich terminal colors.
- Smooth 20 FPS gameplay loop with:
- collision detection
- bullet life management
- score tracking
- Responsive controls and strict challenge mode with a 3-bullet active limit for authentic arcade pacing.
- Progressive alien wave system (2x5 start, 3x5, up to 5x5 rows)
Tech Stack
- Node.js (runtime)
drawille-canvas(Braille-based canvas rendering)terminal-kit(terminal control, color output, input handling)figlet(ASCII art Headers and GAME OVER text)
Technical Highlights
- Layering strategy avoids color bleed by rendering ship, aliens and bullets on separate layers before compositing.
- Custom center alignment logic draws the figlet
GAME OVERscreen with floating overlay text. - 40ms frame loop supports smooth gameplay and responsive control.
Contribution Guide
Thank you for considering enhancement of TERMINAL INVADERS!
- Fork the repository.
- Create a feature branch:
git checkout -b feature/your-feature. - Install dependencies and run the game to verify behavior.
- Make your code changes and keep them focused (gameplay, UI, docs, bug fixes).
- Add or update tests/docs as needed.
- Commit with a clear message and push to your fork.
- Open a pull request with a summary and testing notes.
We appreciate clean code, minimal side effects, and user-friendly controls.
Running
node index.jsTip: Use
Rto restart and keep chasing higher score multipliers as the alien grid grows.
