Skip to content

Snake Game is a classic implementation of the popular Snake game in C++ using the Raylib library.

Notifications You must be signed in to change notification settings

RafayKhattak/snake-cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

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:
git clone https://github.com/your-username/snake-cpp.git
  1. Build the game using your C++ compiler (.exe already available in build folder)
  2. 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.

About

Snake Game is a classic implementation of the popular Snake game in C++ using the Raylib library.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published