Welcome to the Pygame Snake Game, a classic arcade experience implemented in Python using the Pygame library! Enjoy the game with dynamic music and compete for high scores.
The Pygame Snake Game is a simple yet addictive game where the player controls a snake that must navigate through a grid, collecting food to grow while avoiding collisions with its own body and the walls.
- Intuitive controls for an engaging gaming experience.
- Growing snake length as you consume food, challenging you to strategize your moves.
- Game over when the snake collides with the walls or itself.
- Score tracking to measure your progress.
- The game dynamically changes background music to enhance the gaming atmosphere.
- Enjoy a variety of tunes while navigating the snake through the grid.
- Compete for the highest score!
- High scores are stored in the
highscore.txtfile.
-
Clone the repository to your local machine:
git clone https://github.com/Somesh-nayek/Snakes_game.git
-
Navigate to the project directory:
cd Snakes_game -
Install Pygame (if not already installed):
pip install pygame
-
Run the game:
python Snakes_game.py
-
Enjoy playing the Pygame Snake Game with dynamic music and high scores!
- Use the arrow keys to control the snake's direction (up, down, left, right).
- Collect the food (designated by a symbol) to increase your score and snake length.
- Avoid collisions with the walls and the snake's own body.
- The game ends when the snake collides with a wall or itself.
- pygame: Used for game development and handling graphics.
- os: Utilized for interacting with the operating system, allowing efficient file and directory operations.
- random: Employed to generate random positions for the food items.
- High scores are stored in the
highscore.txtfile. - Check the file to see the current high scores.
Contributions are welcome! If you'd like to contribute to the project, please follow these guidelines:
- Fork the repository and clone it to your local machine.
- Create a new branch for your feature or bug fix.
- Make your changes and ensure the existing tests pass.
- Create a pull request with a clear description of your changes.
This Pygame Snake Game is licensed under the MIT License.
Happy gaming with music and high scores!