Tip
Explore the complete project overview, including UML Diagrams and in-depth explanations, provided by Cognition here.
• Smooth animations and physics (Bird wing movements using sprites)
• Score tracking system and Leaderboard implementation for Top Scores, storing data in .json format
• Pause/resume functionality
• Responsive UI with buttons
• Size selection menu (Small, Medium, Large)
• Press Space to make the bird flap and avoid pipes
• Try to fly through the gaps between pipes to score points
• To Pause the Game - Press P key or double-click the left mouse button
• The game ends when you hit a pipe or the ground
• After game over, click "Play Again" to restart
• If your score is high enough, an input box will appear — enter your name to be featured on the leaderboard
- 📥 Clone the repository:
git clone https://github.com/jafarbekyusupov/flappy-bird-py.git cd flappy-bird-py
- 🐍 Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows use `venv/Scripts/activate`
- 📦 Install dependencies:
pip install -r requirements.txt # On Windows if pip is not recognized: try py -m pip install -r requirements.txt
- 🕹️ Run the game:
python code/main.py
flappy-bird/
├── game/
│ ├── main.py # Entry point that initializes and runs the game
│ ├── settings.py # Game settings and configuration
│ ├── game.py # Main game logic and loop controller
│ ├── bird.py # Bird class handling player character behavior
│ ├── pipes.py # Manages pipe creation, movement and collision
│ ├── interface.py # Handles UI elements including buttons and overlays
│ ├── score_system.py # Manages score tracking and display
│ ├── leaderboard.py # LeaderboardButton button for Main Menu Screen to view leaderboard
│
├── testing/
│ ├── bird-test.py # Unit testing for Bird object from code/Bird.py
│
├── assets/ # Game assets folder
│ ├── img/ # Image assets
│
├── gameplay/
│ ├── gameplay.mp4 # Gameplay Demo in Video Format
│ ├── game-Start-Screen.png # Game Start Screen
| ├── game-getReady-screen.png # Get ready Screen with 3 second countdown
| ├── game-Pause-screen.png # Game Pause Screen
| ├── gameOver-screen.png # Game Over Screen
│ ├── game-Leaderboard.png # Leaderboard
│
├── requirements.txt
├── gameplay.md # Screenshots and video showcasing the Gameplay
└── README.md # This file