Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iambasantarai/saanp.vi
...
https://github.com/iambasantarai/saanp.vi
c makefile sdl2 snake-game vim-keys
Last synced: 8 days ago
JSON representation
...
- Host: GitHub
- URL: https://github.com/iambasantarai/saanp.vi
- Owner: iambasantarai
- License: mit
- Created: 2023-10-16T02:05:46.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-03-18T01:41:42.000Z (10 months ago)
- Last Synced: 2024-11-06T03:13:57.883Z (about 2 months ago)
- Topics: c, makefile, sdl2, snake-game, vim-keys
- Language: C
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
saanp.viI developed this simple Snake Game using the SDL2 library in C.
I was inspired by a video on the [CS50](https://www.youtube.com/@cs50) YouTube channel, which demonstrated [2D Games in C using SDL](https://www.youtube.com/watch?v=yFLa3ln16w0).
The name **`saanp.vi`** (with 'saanp' meaning 'snake') playfully describes the snake-like behavior of my friends, while 'vi' refers to the Vim keybindings used for controls.## Project setup
### Prerequisites
- [SDL2](https://www.libsdl.org/)
- C Compiler (gcc, g++ etc.)#### Void linux
```bash
sudo xbps-install gcc SDL2 SDL2-devel -y
```### Getting Started
Clone the repository
```bash
git clone [email protected]:iamsampang/saanp.vi.git
```Navitage to the project directory
```bash
cd saanp.vi
```Build the game using `make`
```bash
make
```Run the game
```bash
./main.bin
```## Controls
| KEY | ACTION |
| ----- | ------------- |
| `i` | start game |
| `h` | move left |
| `j` | move down |
| `k` | move up |
| `l` | move right |
| `esc` | quit the game |