Welcome to the Snake game built using the Pygame library! This classic arcade-style game challenges you to control a snake, help it grow by eating food, and avoid collisions with walls and the snake's own body.
Before you start playing, make sure you have the following requirements met:
- Python 3.x installed
- Pygame library installed (
pip install pygame
)
-
Clone this repository to your local machine or download the ZIP file.
-
Open a terminal or command prompt and navigate to the project directory.
-
Run the following command to start the game:
python snake_game.py
-
Use the arrow keys (or 'W', 'A', 'S', 'D') to control the snake's movement.
- ↑ or 'W': Move Up
- ↓ or 'S': Move Down
- ← or 'A': Move Left
- → or 'D': Move Right
-
Eat the food (green dots) to increase your score and the snake's length.
-
Avoid colliding with the walls and the snake's body. If you collide, the game is over.
-
Press 'F' while holding the 'Ctrl' key to change the location of the food.
-
Press '+' or '-' while holding the 'Ctrl' key to adjust the snake's speed.
-
Press 'M' while holding the 'Ctrl' key to toggle self-collision mode (body crash).
-
Have fun and try to beat your high score!
- Classic Snake gameplay with Pygame graphics.
- Interactive main menu with "Start" and "Quit" buttons.
- Background music and game over sound effects.
- Customizable food location, snake speed, and self-collision mode.
Aayush Chouhan
This project is licensed under the MIT License.