Skip to content

A classic snake game using python and pygame

License

Notifications You must be signed in to change notification settings

sidinsearch/Snake-Game

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snake Game

A modern twist on the classic Snake game, implemented in Python using Pygame.

Features

  • Smooth, grid-based gameplay
  • Dynamic difficulty: speed increases as you collect food
  • Special "big food" items appear periodically for bonus points
  • Power-up mode: temporarily invincible to obstacles
  • Obstacles that change with each level
  • Mouse control option for intuitive gameplay
  • Retro-style pixelated font (when available)
  • High score tracking
  • Game over screen with score and level display

Requirements

  • Python 3.x
  • Pygame

Installation

  1. Clone this repository:
    git clone https://github.com/yourusername/snake-game.git
    
  2. Navigate to the game directory:
    cd snake-game
    
  3. Install the required packages:
    pip install pygame
    

How to Play

  1. Run the game:
    python snake.py
    
  2. Control the snake using arrow keys or mouse movement
  3. Eat food to grow and increase your score
  4. Avoid obstacles and running into yourself
  5. Collect big food items for bonus points and temporary invincibility
  6. Try to achieve the highest score possible!

Controls

  • Arrow Keys: Change snake direction
  • Mouse Movement: Alternate control method (can be switched during gameplay)
  • Space Bar: Restart game after Game Over

Game Play

Game-Play.mp4

Customization

You can easily customize various aspects of the game by modifying the constants at the beginning of the snake.py file:

  • Screen dimensions
  • Grid size
  • Colors
  • Game speed
  • Power-up duration
  • Big food frequency

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

About

A classic snake game using python and pygame

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%