https://github.com/radicazz/slang
Cross-platform snake written in C99
https://github.com/radicazz/slang
c99 cmake cross-platform game sdl snake
Last synced: 5 months ago
JSON representation
Cross-platform snake written in C99
- Host: GitHub
- URL: https://github.com/radicazz/slang
- Owner: radicazz
- License: gpl-3.0
- Created: 2025-08-04T23:17:09.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-12-15T21:35:08.000Z (6 months ago)
- Last Synced: 2025-12-16T21:36:29.652Z (6 months ago)
- Topics: c99, cmake, cross-platform, game, sdl, snake
- Language: C
- Homepage:
- Size: 160 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
- Agents: AGENTS.md
Awesome Lists containing this project
README
# 🐍 slang
[](https://github.com/radicazz/slang/releases)
[](https://github.com/radicazz/slang/actions/workflows/tests.yml)
[](https://github.com/radicazz/slang/blob/main/LICENSE.txt)
My take on the classic snake game, built using C99, CMake and SDL3.
Gameplay Example

## Controls
- Use `arrows` or `wasd` to 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 `esc` to pause and unpause the game.
- Use the Options button on the start or pause menus to adjust volume or mute.
## Config
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:
```ini
high_score=12
mute=0
volume=0.80
resume_delay=2
```
## Building
> This project uses git submodules to manage dependencies. They may require additional dependencies themselves.
- [C Compiler](https://en.cppreference.com/w/c.html) (e.g., GCC, Clang, MSVC)
- [CMake](https://cmake.org/) (version 3.16 or higher)
- [SDL3](https://www.libsdl.org/) (automatically handled via submodules)
Start off by cloning the repository with its submodules:
```bash
# Clone the repository with submodules
git clone --recurse-submodules https://github.com/radicazz/slang.git
cd slang
```
Then, configure and build the project using CMake:
```bash
# Configure & build the project
cmake -S . -B build
cmake --build build
```
The compiled executable will be located in the `build` directory.
## License
This project is licensed under the GNU General Public License v3.0 - see the [LICENSE.txt](LICENSE.txt) file for details.