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.
Currently the build system available are:
MS Build (Visual Studio)
GNU Make
If you are a beginer, try to
- Contribute and fix the issues that will be posted.
- Add new issues.
- Create a CMAKE file
- SFML 2.4.1 or above - http://www.sfml-dev.org/
```
sudo apt-get install libsfml-dev
```
- Vist www.sfml-dev.org and download the lastest version of the library.
- In project settings,
- Add the
</path/to/sfml/>/include
to your c++ include path. - Then add
</path/to/sfml/>/lib
to the linker extra library path.
- GameMenu library : Link : https://github.com/ParadoxZero/GameMenu-cpp
- Visual Studio 15 or above
- VC++ 15 or above
- g++ 4.8 or above
- GNU Make
-
Download the source code.
-
Import into Visual Studio
-
Build according to your need (x64 or x86 or whatever)
Don't forget to link the sfml libraries - graphics, window and system. put the following files in linker input: sfml-system-d.lib, sfml-window-d.lib, sfml-graphics-d.lib and GameMenu.lib
-
Copy the sfml dlls (window, graphics and system) along with the executable
-
Then Run and enjoy
(Build will work, but the application is untested)
- Download source code
- cd to directory eg
$ cd sfml-snake
- Run make
$ make
- the exectable
bin/game
should apear. The directory will be created if doesn't exist. - Run and enjoy
- 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.