Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/azrielx86/ncurses-snake
The snake game written in C with ncurses
https://github.com/azrielx86/ncurses-snake
c game ncurses ncurses-game snake-game
Last synced: 24 days ago
JSON representation
The snake game written in C with ncurses
- Host: GitHub
- URL: https://github.com/azrielx86/ncurses-snake
- Owner: Azrielx86
- License: mit
- Created: 2022-08-11T04:37:04.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-08-06T03:26:14.000Z (5 months ago)
- Last Synced: 2024-08-06T06:17:51.072Z (5 months ago)
- Topics: c, game, ncurses, ncurses-game, snake-game
- Language: C
- Homepage:
- Size: 266 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Snake
Snake game written in C using ncurses.
## Compilation
You can compile this using `make` or with the following steps
On Linux
clang main.c menu.c -o Snake -lncurses
If you have troubles compiling it on Linux, try this (idk why but in Gentoo -lncurses was not enough)
clang main.c menu.c -o Snake $(pkg-config --cflags --libs ncurses)
On Windows
gcc main.c -lpdcurses -o Snake.exe
To install pdcurses on Windows, download MinGW, and pdcurses from here and follow this steps.
## Preview
![ncurses Snake](./snake.gif)
## Debug
To show more information like the board size, the fruit coordinates and the snake coordinates, you can use the debug option.
clang -lncurses -DDEBUG main.c -o Snake
## To do
Add score saving and loading