The most addictive terminal Snake game you've ever played.
A modern, colorful, and highly replayable implementation of the classic Snake game written in clean C++ with ncurses. Features smooth controls, progressive difficulty, persistent high scores, and that perfect "just one more try" feeling.
- Beautiful terminal UI — Colored snake (cyan head + green body), red food, elegant borders
- Progressive difficulty — Speed increases every 5 fruits eaten (real level progression)
- Persistent high scores — Saved automatically in
~/.addictsnake_highscore - Smooth controls — Supports both WASD and Arrow keys
- Quality of life — Pause (
P), instant restart on Game Over (R), clean quit - Bonus scoring — Extra points at milestones for that dopamine hit
- Single-file codebase — Easy to read, modify, and learn from
- Cross-platform — Works great on macOS and Linux
| Key | Action |
|---|---|
W / ↑ |
Move Up |
S / ↓ |
Move Down |
A / ← |
Move Left |
D / → |
Move Right |
P |
Pause / Resume |
Q or ESC |
Quit |
R |
Restart (on Game Over) |
Tip: You cannot reverse direction instantly — this prevents accidental deaths.
git clone https://github.com/YOUR_USERNAME/addictsnake.git
cd addictsnakemakeOr manually:
g++ -std=c++11 -o addictsnake addictsnake.cpp -lncursesOn Apple Silicon (M1/M2/M3/M4) Macs (if make complains):
make
# or
g++ -std=c++11 -I/opt/homebrew/include -L/opt/homebrew/lib -o addictsnake addictsnake.cpp -lncurses./addictsnakeThat's it. Enjoy the addiction.
| Command | Description |
|---|---|
make |
Build the game |
make run |
Build + launch immediately |
make clean |
Remove the binary |
make install |
Install to /usr/local/bin (sudo) |
- C++11 compatible compiler (
g++orclang++) - ncurses library
- macOS:
brew install ncurses - Ubuntu/Debian:
sudo apt install libncurses5-dev - Fedora:
sudo dnf install ncurses-devel
- macOS:
- The speed curve is perfectly tuned — it starts chill and becomes intense
- High score persistence creates a personal leaderboard
- The "Level" indicator gives clear progression feedback
- Clean visual feedback (bold head, pulsing food, nice borders)
- Instant restart keeps the flow state going
(Add your own screenshots here after playing — the game looks great in most terminals)
Gameplay
╔══════════════════════════════════════════╗
║ ║
║ Ooo ║
║ o ║
║ o ║
║ * ║
║ ║
╚══════════════════════════════════════════╝
SCORE: 120 HIGH: 340 Level: 4
This is a single-file game meant to be simple and fun. Feel free to fork and add:
- Power-ups (golden apple, slow time, etc.)
- Multiple levels / obstacles
- Sound effects (with
beepor external lib) - Online leaderboard
- Windows support (PDCurses)
Pull requests welcome!
MIT License — feel free to use, modify, and share.
Built with ❤️ and lots of terminal sessions by Grok + you.
Pro tip: Try to beat 500 points. It gets really hard after that.
Enjoy the loop. 🐍🔥