Console Snake Game
A classic Snake game rendered in the terminal using ncurses, with growing snake segments, randomly placed food, collision detection, and an increasing speed as the score grows. Learners practice ncurses for terminal graphics, deque-based game state, and real-time input handling.
- Estimate
- ~7h
- Steps
- 5
- Completed by
- 0
- Proposed by
- codeseed.app
ncurses
Project roadmap
- 01
Set up ncurses window and game loop
~1.5hInitialize ncurses in non-blocking input mode and build the main timed game loop.
- 02
Represent the snake as a deque of segments
~1.5hStore snake body positions in a std::deque, pushing a new head and popping the tail each move.
- 03
Implement food placement and growth
~1.5hRandomly place food avoiding the snake's body, and grow the snake when food is eaten instead of popping the tail.
- 04
Add collision detection
~1.5hDetect wall and self-collisions to end the game, tracking the final score.
- 05
Add increasing difficulty
~1hGradually decrease the loop delay as the score increases to speed up gameplay.
Resources
Ready to build this?
Get a GitHub repo and start building. Your AI reviewer checks each step as you go.
Tech stack