Skip to content

mZake/SnakeGame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

This is a clone of the classical snake game made with C++ and SDL2. Control the snake to eat apples and grow, but avoid hitting the walls or yourself!

Image


Controls

Arrow keys: Move the snake. P key: Pause the game.


Prerequisites

The following tools are required:

  • CMake 3.15 or higher
  • Compiler with support to C++17
  • SDL2 library
  • SDL2_image library
  • SDL2_ttf library

Build Instructions

For Windows systems, you can download the precompiled binaries here.

Clone the repository:

git clone https://github.com/mZake/SnakeGame.git
cd SnakeGame

Create a build directory and compile the project:

mkdir build
cd build
cmake ..
cmake --build .

The compiled binary will be generated in the project root directory.


Note

Make sure the assets folder is located in the same directory as the compiled binary!

About

A clone of the snake game made with C++ and SDL2

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors