This repository contains a simple game project built using SFML. The project includes various components such as a game manager, snake, textbox, window manager, world manager, and an event manager.
Before you can build and run this project, you need to have the following software installed on your system:
- GNU Compiler Collection (GCC) (specifically g++)
- SFML (Simple and Fast Multimedia Library)
You can install SFML on your system using your package manager. Here are some examples:
For Ubuntu/Debian:
sudo apt-get update
sudo apt-get install libsfml-dev
For macOS (using Homebrew):
brew update
brew install sfml
For Windows: Download the appropriate version of SFML from the SFML download page and follow the installation instructions provided there.
To build the project, you can use the provided Makefile. Follow these steps:
-
Open a terminal and navigate to the project directory.
-
Run the following command to compile and link the project:
make
This will create an executable file named app in the project directory.
After building the project, you can run the game using the following command:
./app
To remove the generated object files and the executable, run the following command:
make clean
main.cpp
: Entry point of the game.Game.cpp / Game.hpp
: Game manager implementation.Snake.cpp / Snake.hpp
: Snake game logic.Textbox.cpp / Textbox.hpp
: Textbox implementation.Window.cpp / Window.hpp
: Window manager.World.cpp / World.hpp
: World management logic.EventManager.cpp / EventManager.hpp
: Event handling.
If you would like to contribute to this project, please fork the repository and submit a pull request with your changes.
This project is licensed under the MIT License. See the LICENSE file for more details.