A classic Flappy Bird clone built with Python and Pygame, featuring modular architecture and smooth gameplay.
- Classic Gameplay — Navigate the bird through pipes by pressing space
- Score Tracking — Keep track of your high score
- Sound Effects — Immersive audio feedback for jumps, collisions, and points
- Modular Architecture — Clean separation of game components
- Restart Functionality — Press ESC to restart after game over
FlappyBird/
├── main.py # Game loop and event handling
├── bird.py # Bird sprite with physics
├── column.py # Pipe obstacles
├── floor.py # Scrolling floor
├── background.py # Background rendering
├── score.py # Score display
├── assets.py # Asset loading utilities
├── configs.py # Game configuration
├── layer.py # Sprite layering
├── gamestart_message.py # Start screen
├── gameover_message.py # Game over screen
└── assets/ # Images and sounds
- Python 3.x
- Pygame
-
Clone the repository:
git clone https://github.com/RaulAbakarov/FlappyBird.git cd FlappyBird -
Install Pygame:
pip install pygame
-
Run the game:
python main.py
| Key | Action |
|---|---|
SPACE |
Flap / Start game |
ESC |
Restart (after game over) |
- Pygame Sprites — Uses
pygame.sprite.LayeredUpdatesfor efficient rendering - Event-Driven — Custom events for pipe spawning
- Collision Detection — Sprite-based collision checking
- Asset Management — Centralized loading of sprites and audio
The game features the classic Flappy Bird aesthetic with:
- Animated bird with flapping wings
- Randomly generated pipe gaps
- Scrolling background and floor
- Real-time score display
This project is open source and available under the MIT License.