This is a classic Snake Game implemented in Python using the Pygame library. The objective of the game is to control the snake and collect food to grow longer while avoiding collisions with the walls or itself.
- Move the snake using arrow keys or WASD.
- Eat food to grow longer and score points.
- Game over screen with the option to play again or quit.
- Simple UI with buttons to start, restart, or quit the game.
- Displays current score during gameplay.
- Cool animations and color effects for snake and food.
Main Menu | In-Game | Game Over |
---|---|---|
snakegame.mp4
You need to have Python installed on your machine. You can download it from here.
You will also need the Pygame library. You can install it using pip:
pip install pygame
Run the following command to play the game
python game.py
- Arrow Keys / WASD: Move the snake up, down, left, or right.
- Start Button: Begin the game from the main menu.
- Quit Button: Exit the game from either the main menu or game over screen.
- Start the Game: Upon launching the game, click on the "Start" button to begin.
- Control the Snake: Use the arrow keys or WASD to move the snake around the screen.
- Eat the Food: Guide the snake to the red food to increase your length and score.
- Avoid Collisions: If the snake hits the walls or itself, the game will end.
- Game Over: When the game is over, you can choose to either play again or quit.
- Python: The core programming language.
- Pygame: Used to handle game mechanics, graphics, and rendering.
- Safwan Sayeed