https://github.com/emad-elsaid/snake
Snake game in C++
https://github.com/emad-elsaid/snake
Last synced: 7 months ago
JSON representation
Snake game in C++
- Host: GitHub
- URL: https://github.com/emad-elsaid/snake
- Owner: emad-elsaid
- Created: 2021-12-14T11:43:11.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-12-18T21:29:31.000Z (almost 4 years ago)
- Last Synced: 2025-01-18T09:34:14.810Z (9 months ago)
- Language: C++
- Size: 20.5 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
SNAKE
=====Snake game, I made it as an exercise for C++ and using Raylib.
# Screenshots

# How does it work
It's pretty simple and small ~100 Lines of Code (LoC). consists of one big main function.
It keeps the score, generates food for the snake randomly. and check collisions with the edges and itself.
The game will lock FPS to 10 then increase it 1 FPS everytime the snake eats food.
# Compiling
To compile and run it. make sure you have raylib and clang on your machine. on Archlinux
```shell
# pacman -S raylib clang
```run the `run` bash script to compile and run it
```shell
$ ./run
```