A classic snake game made in C++ using sfml library. It will be a good way to learn about different aspect of development with C++ for a beginer.
If you are a beginer, try to
- Contribute and fix the issues that will be posted.
- Add new issues.
- Create a CMAKE file
- A valid C++ compiler - clang, gcc, msvc that supports c++20
- cmake >= v3.16
The CMAKE is set up to automatically download the dependencies and link against it. It will be done when configuring cmake.
git clone https://github.com/ParadoxZero/sfml-snake.git
cd sfml-snake
make build
git clone https://github.com/ParadoxZero/sfml-snake.git
- Create a directory for cmake , e.g. -
mkdir build
cd build
cmake .. -G Ninja
orcmake ..
(to use the default build system)ninja snake
ormake snake
(depending on your selected build system)
- Lot's of work remaining.
- GUI Menu (see https://github.com/ParadoxZero/GameMenu-cpp)
- Settings and user data save system.
- Sound
- In case you are woundering about the extra complication in moving snake - That is done in order to smoothen the animation of movement. To have slower/ variable speed of snake in Higher framerate
Feel free to fork, fix the issues and contribute. Help is always welcome.