https://github.com/rafaykhattak/snake-cpp
Snake Game is a classic implementation of the popular Snake game in C++ using the Raylib library.
https://github.com/rafaykhattak/snake-cpp
cpp oop oops-in-cpp raylib raylib-cpp snake-game
Last synced: about 2 months ago
JSON representation
Snake Game is a classic implementation of the popular Snake game in C++ using the Raylib library.
- Host: GitHub
- URL: https://github.com/rafaykhattak/snake-cpp
- Owner: RafayKhattak
- Created: 2023-06-11T16:28:53.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-06-12T07:32:29.000Z (over 2 years ago)
- Last Synced: 2024-11-13T02:32:19.716Z (about 1 year ago)
- Topics: cpp, oop, oops-in-cpp, raylib, raylib-cpp, snake-game
- Language: C
- Homepage:
- Size: 1.54 MB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Snake Game
This is a classic Snake Game implementation in C++ using the Raylib library. The game allows the player to control a snake and navigate it on a grid to eat food and grow longer. The objective is to achieve the highest score possible without colliding with the walls or the snake's own body.

## Features
- Responsive and intuitive controls: Use the arrow keys to navigate the snake on the grid.
- Random food placement: The food is placed randomly on the grid each time it is consumed.
- Score tracking: Keep track of the current score and the highest score achieved.
- Sound effects: Enjoy audio feedback with sound effects for eating food, hitting the wall, and moving the snake.
- High score persistence: The highest score is saved to a file and loaded when the game is launched.
## Requirements
- C++ compiler (supporting C++11 or later)
- Raylib library installed in C Drive
## Installation
1. Clone the repository:
```shell
git clone https://github.com/your-username/snake-cpp.git
```
2. Build the game using your C++ compiler (.exe already available in build folder)
3. Run the executable available in the build folder
## Contributing
Contributions are welcome! If you would like to contribute to this project, please follow these steps:
- Fork the repository.
- Create a new branch.
- Make your changes and commit them.
- Push your changes to your forked repository.
- Submit a pull request.
## Acknowledgments
- The Raylib library for providing an easy-to-use framework for game development.