The snake game written in C++ using SDL2 library
inspired by Google Snake Game
Also available page on itch.io
release 1.0
After installing SDL2, SDL2_mixer, SDL2_ttf and SDL2_image, execute the following commands
git clone https://github.com/kotivas/cnake
cd cnake
mkdir obj bin
make
The compiled executable file will be located in ./bin/
Warning
Be sure to run with ./bin/cnake
out of the bin directory of the repository.
Otherwise the game will not be able to find assets.
After installing Mingw32, follow these steps
-
Download source code
-
Create folders
sdl2
obj
bin
-
Download SDL2-devel-mingw, SDL2_mixer-devel-mingw, SDL2_tff-devel-mingw, SDL2_image-devel-mingw and extract folder
i686-w64-mingw32
from all this archives into thesdl2
folder
Important
The folder structure should look like this:
cnake
βββ sdl2
βΒ Β βββ include
βΒ Β βΒ Β βββ SDL2
βΒ Β βββ lib
βΒ Β βββ cmake
βΒ Β βΒ Β βββ SDL2
βΒ Β βΒ Β βββ SDL2_image
βΒ Β βΒ Β βββ SDL2_mixer
βΒ Β βΒ Β βββ SDL2_ttf
βΒ Β βββ pkgconfig
-
Run the makefile through mingw
-
The compiled executable file will be located in
bin/
Warning
cnake.exe and folder assets
should be in the one folder
Otherwise the game will not be able to find assets.
I express special gratitude to my friends, GrayCircle and VaneZ, who supported and helped develop the game all throughout its development