Skip to content

kotivas/cnake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🐍 Cnake

The snake game written in C++ using SDL2 library

inspired by Google Snake Game

Also available page on itch.io

πŸ“· Gameplay

gameplay

release 1.0

πŸ› οΈ Compiling

🐧 Unix-like

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.

πŸͺŸ Windows

After installing Mingw32, follow these steps

  1. Download source code

  2. Create folders sdl2 obj bin

  3. 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 the sdl2 folder

Important

The folder structure should look like this:

cnake
β”œβ”€β”€ sdl2
β”‚Β Β  β”œβ”€β”€ include
β”‚Β Β  β”‚Β Β  └── SDL2
β”‚Β Β  └── lib
β”‚Β Β      β”œβ”€β”€ cmake
β”‚Β Β      β”‚Β Β  β”œβ”€β”€ SDL2
β”‚Β Β      β”‚Β Β  β”œβ”€β”€ SDL2_image
β”‚Β Β      β”‚Β Β  β”œβ”€β”€ SDL2_mixer
β”‚Β Β      β”‚Β Β  └── SDL2_ttf
β”‚Β Β      └── pkgconfig
  1. Run the makefile through mingw

  2. 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.

πŸ’œ Thanks

I express special gratitude to my friends, GrayCircle and VaneZ, who supported and helped develop the game all throughout its development