Classic Snake Arcade Game — Modern Remake
A modern, visually enhanced remake of the classic Snake arcade game built with Python and Pygame. Features smooth controls, beautiful graphics, sound effects, and a persistent leaderboard system.
snake — a modern, visually enhanced remake of the classic Snake arcade game built with Python and Pygame. Features smooth controls, beautiful graphics, sound effects, and a persistent leaderboard system.
| Action | Keys |
|---|---|
| Move Left | ← or A |
| Move Right | → or D |
| Move Up | ↑ or W |
| Move Down | ↓ or S |
| Pause/Resume | SPACE |
| Submit Score | ENTER (on Game Over screen) |
Requirements: Python 3.8+, Pygame
# Clone the repository git clone https://github.com/aixandrolab/snake.git cd snake # Install dependencies pip install -r requirements.txt # Run the game python app.py
snake/ ├── app.py # Application entry point ├── core/ │ ├── game.py # Main game logic and state management │ ├── models/ # Game entity models │ │ ├── button.py # UI button component │ │ ├── food.py # Food/Apple entity with animation │ │ ├── input_box.py # Text input component │ │ └── snake.py # Snake entity with collision detection │ └── utils/ # Utility modules │ ├── colors.py # Color palette definitions │ ├── direction.py # Movement direction enum │ └── position.py # Position dataclass ├── tools/ │ └── database.py # SQLite leaderboard management ├── data/ # Game assets │ ├── images/ │ │ ├── leaderboard.png │ │ ├── main_screen.png │ │ ├── playground.png │ │ └── snake.png │ ├── music/ │ │ ├── music.mp3 │ │ └── game_over.mp3 │ └── sounds/ │ ├── button.wav │ └── eat.wav └── requirements.txt # Python dependencies
Change Game Window Size:
Edit core/game.py:
self.width = 1000 # Your preferred width self.height = 700 # Your preferred height
Modify Game Speed Options:
In draw_settings_screen() method:
speeds = [10, 15, 20, 25, 30] # Add or remove speed options
Add New Snake Colors:
In core/utils/colors.py:
SNAKE_YOUR_COLOR = (R, G, B) # Add to Colors class
pip install pyinstaller pyinstaller --onefile --windowed --add-data "data:data" app.py
| Issue | Solution |
|---|---|
| Game won't start | Ensure Python 3.8+ and Pygame are installed |
| No sound | Check that sound files exist in data/ directory |
| Black screen | Verify graphics drivers are up to date |
| Database error | Ensure write permissions in game directory |
python app.pyBy using this software, you agree to the full disclaimer terms.
Software provided "AS IS" without warranty. You assume all risks.
Full legal disclaimer: See DISCLAIMER.md
License: MIT License