🐍 Snake Game (C++ Console)
Watch the project video on LinkedIn: Click here
A console-based Snake Game developed in C++ with colorful terminal output, sound effects, and multiple difficulty levels. The game runs on Windows and provides an interactive console experience.
✨ Features
🟢 Multiple difficulty levels: Easy, Medium, Hard, Very Hard
🎨 Colored console interface using ANSI escape codes
🔊 Sound effects for eating fruits and losing (Windows PlaySound)
🔢 Dynamic snake tail movement
🕹️ Real-time input using keyboard (w, a, s, d)
🏆 Score tracking and automatic game over detection
🔄 Option to play again without restarting the program
🕹️ Gameplay
The game starts with a main menu to choose the difficulty level.
Snake starts at the center of the map.
Player moves the snake using keys:
w → Up
s → Down
a → Left
d → Right
Eat fruits ($) to increase score and grow the tail.
Hitting walls or the snake tail ends the game.
After losing, you can choose to play again.
🎯 Controls
w, a, s, d → Move the snake
x → Exit the game
Y / N → Play again or exit
🛠️ Technologies Used
Language: C++ Platform: Windows
Libraries & Headers:
→ Input/output
→ Random number generation
<conio.h> → Real-time key input
<windows.h> → Console manipulation & Sleep
<mmsystem.h> → Play sound effects
Concepts:
Arrays & structures
Functions
Loops & conditions
Enums
Random number generation
Console cursor manipulation
Make sure you are using Windows.
Compile the code using a C++ compiler (e.g., MinGW or Visual Studio).
Run the executable from the console.
Example (MinGW):
g++ snake_game.cpp -o snake_game snake_game
Click on any image to watch the project video on LinkedIn
📸 Screenshots
📌 Notes
This project is designed for learning C++ fundamentals and practicing console application development.
Sound effects work only on Windows OS.
Difficulty levels control the speed of the snake (Lower value = faster movement).
👤 Author
Wael Samer Software Engineering Student
GitHub : github.com/waelodeh98
LinkedIn : linkedin.com/in/wael-samer


