Skip to content

"A Python-based Snake Game using Pygame, featuring smooth movement, score tracking, and basic controls. Perfect for learning simple game development."

Notifications You must be signed in to change notification settings

DharshanSR/snake-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

🐍 Snake Game

A simple Snake Game built using Python and Pygame. The game offers a fun and interactive experience with a smooth snake movement and basic features like start, score display, and a game-over screen.

Python Pygame

🎮 Game Features

  • Smooth Snake Movement: A snake that grows in length as it consumes food.
  • Food Generation: Randomly generates food for the snake to eat.
  • Score Display: Tracks your score as you play.
  • Game Over Screen: Displays a message and allows the player to restart or quit.
  • Main Menu: Start and Quit buttons to control the game.
  • Realistic Snake Design: Snake is displayed using rounded segments instead of blocks.

🚀 Getting Started

Prerequisites

Make sure you have Python installed on your system. You can download it from the official site: Python.org

You will also need the Pygame library, which you can install using pip:

pip install pygame

How to Run the Game

  1. Clone the repository:

    git clone https://github.com/DharshanSR/snake-game.git
    cd snake-game
  2. Run the game:

    python snake_game.py

Game Controls

  • Arrow Keys: Control the direction of the snake.
  • Q: Quit the game.
  • R: Restart the game after losing.

🖼️ Screenshots

Snake Game Screenshot

🛠️ Built With

  • Python: Core programming language.
  • Pygame: Used to create the game's interface and handle game logic.

📚 Learn More

To learn more about Python and Pygame, check out:

🤝 Contributing

Contributions are welcome! If you'd like to improve this project, feel free to submit a pull request or open an issue.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/YourFeature)
  3. Commit your changes (git commit -m 'Add your feature')
  4. Push to the branch (git push origin feature/YourFeature)
  5. Open a pull request

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

About

"A Python-based Snake Game using Pygame, featuring smooth movement, score tracking, and basic controls. Perfect for learning simple game development."

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Languages