An open API service indexing awesome lists of open source software.

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.

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.
![imgonline-com-ua-twotoone-9IDzz9VA7ZOUCAOY](https://github.com/RafayKhattak/snake-cpp/assets/90026724/48fa982e-0ea1-4d14-958a-7452b7e701d6)
## 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.