ESC - exit the game
P - pause the game
R - restart the game (ignoring score and record)
- Clone this repo
git clone https://github.com/framilano/SnakePlusPlus.git
- You need SFML and TGUI libraries, install them with:
sudo add-apt-repository ppa:texus/tgui-0.8
sudo apt-get update
sudo apt-get install libtgui-dev && sudo apt install libsfml-dev
- Compile snakeplusplus opening a terminal inside src/:
g++ -Wall -g scenes.cpp headers/scenes.h snakeplusplus.cpp -lsfml-audio -lsfml-graphics -lsfml-system -lsfml-window -ltgui -o snakeplusplus
- Clone this repo
git clone https://github.com/framilano/SnakePlusPlus.git
To build SnakePlusPlus I highly suggest to use Visual Studio 2019
- Create a new empty C++ project in Visual Studio, include and link the SFML libraries (using this guide)
- As you did with SFML, link TGUI libraries in the exact same way
- Inside your project's root folder copy assets, configs and src folders
- Add snakeplusplus.cpp and scenes.cpp to source files in VS, add scenes.h to headers files in VS
- Run in Release x86 mode after compiling the project, the new compiled executable will now appear in \Release
- Add next to the executable both assets and configs folders