Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/villy-p/ascii-snake
An ASCII implementation of Snake within C. All within your very own console!
https://github.com/villy-p/ascii-snake
ansii ascii c console console-game game snake snake-game
Last synced: 24 days ago
JSON representation
An ASCII implementation of Snake within C. All within your very own console!
- Host: GitHub
- URL: https://github.com/villy-p/ascii-snake
- Owner: Villy-P
- License: mit
- Created: 2024-05-01T00:38:20.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-09-09T21:16:53.000Z (2 months ago)
- Last Synced: 2024-10-11T12:15:57.959Z (about 1 month ago)
- Topics: ansii, ascii, c, console, console-game, game, snake, snake-game
- Language: C
- Homepage:
- Size: 142 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ASCII-Snake
An ASCII implementation of Snake within C. All within your very own console!
This project uses ``, so it is only compatible with Windows OS.![Image](./assets/animation.gif)
## How it works
A simple while loop with a `sleep` statment at the end of the logic moves the screen,
while ANSII escape codes handle "refreshing" the screen.The program uses the Windows function `GetAsyncKeyState` to get keypresses that occured while the program was still refreshing.
## Running the program
Make sure you have `ninja`, `cmake`, and a `C compiler`.
Then run these commands:
``` txt
make reset
make run
```ASCII-Snake uses classic `WASD` controls.