A classic Snake game built with Python and Pygame using an object-oriented design. The game includes smooth animations, sprite-based rendering, background music, and a clean modular codebase.
- Grid-based snake movement with sprite images
- Apple spawning and consumption logic
- Score tracking
- Light/dark green checkerboard background
- Menu screen and game over screen
- Restart and quit options
- Background music loop
- Clean class-based architecture (Snake, Food, Game, UI)
-
Clone this repository:
git clone https://github.com/psupra22/Snake-Game cd Snake-Game -
Install dependencies:
pip install pygame
-
Make sure the following folders exist and contain the appropriate files:
- Graphics/: All the .png sprite images for the snake and apple.
- Sounds/: Background music file (e.g., music.mp3).
Run the game:
python main.py- Arrow keys: Move the snake
- SPACE: Start game from menu
- R: Restart game after game over
- ESC: Quit the game
This project is licensed under the MIT License.
For any inquiries, feel free to reach out at [email protected].