Skip to content

This is a simple snakes game using the pygame module of python

Notifications You must be signed in to change notification settings

Somesh-nayek/Snakes_game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pygame Snake Game with Music and High Scores

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.

Description

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.

Features

  • 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.

Music

  • The game dynamically changes background music to enhance the gaming atmosphere.
  • Enjoy a variety of tunes while navigating the snake through the grid.

High Scores

  • Compete for the highest score!
  • High scores are stored in the highscore.txt file.

Installation Instructions

  1. Clone the repository to your local machine:

    git clone https://github.com/Somesh-nayek/Snakes_game.git
  2. Navigate to the project directory:

    cd Snakes_game
  3. Install Pygame (if not already installed):

    pip install pygame
  4. Run the game:

    python Snakes_game.py
  5. Enjoy playing the Pygame Snake Game with dynamic music and high scores!

Usage Guidelines

  • 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.

Modules Used

  • 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 Score File

  • High scores are stored in the highscore.txt file.
  • Check the file to see the current high scores.

Contribution Guidelines

Contributions are welcome! If you'd like to contribute to the project, please follow these guidelines:

  1. Fork the repository and clone it to your local machine.
  2. Create a new branch for your feature or bug fix.
  3. Make your changes and ensure the existing tests pass.
  4. Create a pull request with a clear description of your changes.

License

This Pygame Snake Game is licensed under the MIT License.

Happy gaming with music and high scores!

About

This is a simple snakes game using the pygame module of python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages