A classic Snake game built from scratch in C++ using the SFML library.
- Classic snake gameplay: grow by eating food and avoid hitting walls or yourself!
- Simple score tracking.
- Clean, minimalist visuals.
- Built with C++ for performance and SFML for cross-platform graphics.
Before you can compile and run the game, make sure you have the following installed on your system:
- A C++ compiler (e.g.,
g++
on Linux,Clang
on macOS, or MinGW/MSVC on Windows). make
build automation tool.git
for cloning the repository.- SFML Library (>= 2.5). You can download it from the official SFML website or install it via your system's package manager.
Example for Debian/Ubuntu-based systems:
sudo apt-get update
sudo apt-get install build-essential libsfml-dev git
You can build and run the project with just a few commands.
-
Clone the repository:
git clone https://github.com/Renan2010/RLSnake.git
-
Navigate to the project directory:
cd RLSnake
-
Compile the game using the Makefile:
make
This will create an executable file named
RLSnake
in the directory. -
Run the game:
./RLSnake
And enjoy the game! :)
Use the following keys to control the snake:
Key | Action |
---|---|
W | Move Up |
A | Move Left |
S | Move Down |
D | Move Right |
Escape | Quit Game |
This project is licensed under the MIT License. See the LICENSE
file for more details.