A simple snake game made using SDL2.
- CMake >= 3.10
- GCC/G++ >= 13.1
-
MinGW-w64
- A suite of development tools installed through MSYS2. You can download it from here.
-
SDL2, SDL2_ttf, and SDL2_image
- Install these libraries using the following command:
pacman -S mingw-w64-x86_64-SDL2 mingw-w64-x86_64-SDL2_ttf mingw-w64-x86_64-SDL2_image
- Install these libraries using the following command:
-
Create a build directory and navigate into it:
mkdir build && cd build
-
Configure the project using CMake:
cmake -G "MinGW Makefiles" .. -
Build the project:
mingw32-make
-
Run the game:
./snek
- Make sure to set the build type (e.g., Release or Debug) if needed:
cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release ..
