A simple Snake Game built using C++ and SFML.
- CMake (version 3.10 or higher)
- Git
- A C++ Compiler (MSVC, GCC, or Clang)
git clone https://github.com/CodeWithDevesh/snake-game.git
cd snake-gameBe patient as this step downloads the required libraries too
mkdir build && cd build
cmake ..
cmake --build . --config Releasemkdir build && cd build
cmake ..
make -j$(nproc)After building, the executable will be inside Release or Debug folder in build.
cd Release
snake-game.exe./snake-gameIf the game does not run due to missing DLLs, manually copy the required SFML DLLs from the build/_deps/sfml-build/lib folder to the executable directory.
- SFML is automatically fetched via CMake's FetchContent.
- If using a different compiler, adjust the cmake command accordingly.