A simple clone of the classic Flappy Bird game written in Python using Pygame. This project includes clean, beginner‑friendly game code along with sprite assets, sound effects, and a retro bitmap font for an authentic arcade feel.
Play, flap, and try to beat your high score!
- Demo
- Features
- Requirements
- Installation
- Running the Game
- Controls
- Project Structure
- Customization
- Contributing
- Troubleshooting
- Notes About the Source
- License
- Credits
A short demo showcasing gameplay and controls:
https://github.com/user-attachments/assets/bde74736-d4d3-408f-b830-bbd13676917a- Classic Flappy Bird gameplay (tap/flap to stay airborne, avoid pipes)
- Score tracking system
- Retro bitmap font (04B_19.TTF)
- Sprite and audio assets included
- Simple, readable code — great for learning Pygame basics
- Python 3.8+ (should also work on Python 3.7)
- Pygame
Install Pygame using pip:
pip install pygamepython -m venv venv
source venv/bin/activate # macOS / Linux
venv\Scripts\activate # Windows
pip install pygame- Clone the repository:
git clone https://github.com/giriYT26/Flappy_Bird_in_Python.git
cd Flappy_Bird_in_Python- Install dependencies:
pip install pygame- Run the game:
python main.pyFrom the project root directory, run:
python main.pyThe game window will open and the main game loop will start automatically.
- Spacebar — Flap / Jump
- Up Arrow — Flap (alternative)
- Mouse Left Click — Flap (alternative)
- Esc / Window Close — Quit the game
Flappy_Bird_in_Python/
│
├── main.py # Main game script (entry point)
├── sprites/ # Image assets (bird, pipes, background, base)
├── audio/ # Sound effects (wing, hit, point, etc.)
├── 04B_19.TTF # Retro bitmap font
├── favicon.ico # Repository icon
├── updates.txt # Changelog / updates
You can easily tweak or expand the game:
- Replace images inside
sprites/to change the look - Add or replace sounds inside
audio/ - Modify game constants in
main.py(gravity, pipe gap, speed, spawn rate) - Swap
04B_19.TTFwith another.ttffont by changing the font load section
Contributions, bug reports, and suggestions are welcome!
How to contribute:
- Fork the repository
- Create a feature branch
- Commit your changes
- Open a pull request with a clear explanation
Guidelines:
- Keep changes focused and minimal
- Update the README if behavior changes
- Ensure the game runs on a clean Python + Pygame setup
- Pygame import errors: Ensure Pygame is installed in the correct Python environment
- Blank window / freezes: Run the game from a terminal to see error messages
- Missing assets: Verify that
sprites/andaudio/directories exist and are not renamed
When opening an issue, please include:
- Your OS
- Python version
- Pygame version
- Full error traceback
This project is intended for learning and educational purposes. The code is kept simple and readable so beginners can understand game loops, events, collisions, and basic animations in Pygame.
This project is released under the MIT License (for now).
- Project Author: giriYT26 (S Giridharan)
- Original Flappy Bird Concept: Dong Nguyen
- Font: 04B_19
- Sprites & Audio: Included in the repository (check individual files for attribution if sourced externally)