My take on the classic snake game, built using C99, CMake and SDL3.
- Use
arrowsorwasdto control the snake. - Eat the red apples to grow longer and score points.
- Avoid running into yourself, or it's game over!
- Walls will wrap around to the other side of the screen.
- Use
escto pause and unpause the game. - Use the Options button on the start or pause menus to adjust volume or mute.
The game writes a config.ini file next to the executable on all platforms. If the file is missing or invalid, it is
recreated with defaults.
Example:
high_score=12
mute=0
volume=0.80
resume_delay=2This project uses git submodules to manage dependencies. They may require additional dependencies themselves.
- C Compiler (e.g., GCC, Clang, MSVC)
- CMake (version 3.16 or higher)
- SDL3 (automatically handled via submodules)
Start off by cloning the repository with its submodules:
# Clone the repository with submodules
git clone --recurse-submodules https://github.com/radicazz/slang.git
cd slangThen, configure and build the project using CMake:
# Configure & build the project
cmake -S . -B build
cmake --build buildThe compiled executable will be located in the build directory.
This project is licensed under the GNU General Public License v3.0 - see the LICENSE.txt file for details.
