Skip to content

Renan2010/RLSnake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RLSnake 🐍

A classic Snake game built from scratch in C++ using the SFML library.

C++ Badge SFML Badge

RLSnake Gameplay Screenshot


✨ Features

  • 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.

📋 Prerequisites

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

🚀 Building and Running

You can build and run the project with just a few commands.

  1. Clone the repository:

    git clone https://github.com/Renan2010/RLSnake.git
  2. Navigate to the project directory:

    cd RLSnake
  3. Compile the game using the Makefile:

    make

    This will create an executable file named RLSnake in the directory.

  4. Run the game:

    ./RLSnake

And enjoy the game! :)


🎮 Controls

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

📜 License

This project is licensed under the MIT License. See the LICENSE file for more details.

About

Simple Snake Game in C++ with SFML

Resources

License

Stars

Watchers

Forks

Packages

No packages published