A stylish GUI Snake game written in C++17 with raylib.
- Three game modes — Classic (deadly walls), Wrap (pass through edges and come back around), and Rocks (dodge boulders scattered on the board)
- Combo system — chain quick eats to build a multiplier up to x5, with a streak meter in the HUD and rising sound pitch
- Main menu — Play, difficulty, mode, settings, high scores, help, quit; navigable with keyboard or mouse, with smooth fade transitions
- Three difficulties (Easy / Normal / Hard) — every mode/difficulty combo keeps its own persistent high score, shown in a 3x3 score table
- Bonus star — a spinning golden star appears every 5 foods; grab it before its timer ring drains for a 50-point bonus (multiplied by your combo)
- Customizable skins — 4 snake skins and 3 food skins with live previews
- Rebindable controls — Settings > Controls, with conflict auto-swap and reset to defaults (arrow keys always steer; Esc is reserved)
- Sound effects — synthesized at startup (no asset files), with an On/Off toggle
- Game feel — smooth cell-to-cell gliding, 3-2-1 countdown, floating score popups, screen shake and red flash on death, glowing pulsing food, particle bursts, directional eyes, ambient menu backdrop
- Crisp typography — loads a system font at runtime (Arial Rounded on macOS, DejaVu on Linux) with a built-in fallback, keeping the zero-asset single-binary design
- Persistent config — everything is saved to
~/.snake_game.cfg
Requires a C++17 compiler and raylib. Builds are verified on macOS and Linux by CI.
macOS
brew install raylib
make
./snakeDebian/Ubuntu
sudo apt install libraylib-dev # or build raylib from source, as CI does
make RAYLIB_PREFIX=/usr # use RAYLIB_PREFIX=/usr/local for source builds
./snakeDefaults shown — movement, pause, and restart are rebindable in Settings > Controls.
| Key | Action |
|---|---|
| Arrows / WASD | Steer / navigate menus |
| Mouse | Hover to select, click to activate |
| Enter / Space | Select menu item |
| Left / Right | Change difficulty, mode, skin, or sound |
| P | Pause/resume |
| R | Restart run |
| Esc | Back to menu / previous screen |
./snake --capture auto-plays the game and regenerates the README screenshots.


