Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kauahensilva/c_snake_game
Snake Game Recreation in C Language
https://github.com/kauahensilva/c_snake_game
c game-2d
Last synced: 9 days ago
JSON representation
Snake Game Recreation in C Language
- Host: GitHub
- URL: https://github.com/kauahensilva/c_snake_game
- Owner: KauaHenSilva
- Created: 2024-02-05T00:10:41.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2024-03-28T16:10:19.000Z (8 months ago)
- Last Synced: 2024-03-28T17:31:19.366Z (8 months ago)
- Topics: c, game-2d
- Language: C
- Homepage:
- Size: 114 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Snake Game in C
This is a project of a snake game implemented in the C language. The game features a snake that the player can control to get food, and the snake grows with each piece of food it eats.
## š Getting Started
Follow the instructions below to have the project running locally.
## š Prerequisites
Make sure you have the GCC compiler installed on your machine. If you are using Windows, you will also need the Winmm library.
GCC --version:
```
gcc.exe (MinGW.org GCC-6.3.0-1) 6.3.0
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
```## ā¤ļø Contribution
Contributions are welcome! To contribute, favorite the project and give your opinion about it!
## š¬ Improve the Project.
Help improve the project! Fork it and develop your creativity!
>https://github.com/KauaHenSilva/C_SnakeGame
## š§ Deployment
1. **Clone this repository:**
```bash
git clone https://github.com/username/project.git
```2. **Navigate to the project directory:**
```bash
cd project
```4. **Compilation with Audio:**
> Uncomment line 13 in the main.c file to add the audio option.
```bash
gcc .\main.c -o main.exe -lWinmm
```5. **Compilation without Audio:**
```bash
gcc .\main.c -o main.exe
```### Usage
Now the project is set up. You can run it with the following command:
```bash
./main.exe
```Use the āwā, āaā, āsā, and ādā keys to control the snake, or use the arrow keys to control the snake. The game ends when the snake hits the wall, hits itself, or when the user presses āxā.