Skip to content

RaulAbakarov/FlappyBird

Repository files navigation

🐦 FlappyBird Game

A classic Flappy Bird clone built with Python and Pygame, featuring modular architecture and smooth gameplay.

Python Pygame

🎮 Features

  • 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

🏗️ Project Structure

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

🚀 Getting Started

Prerequisites

  • Python 3.x
  • Pygame

Installation

  1. Clone the repository:

    git clone https://github.com/RaulAbakarov/FlappyBird.git
    cd FlappyBird
  2. Install Pygame:

    pip install pygame
  3. Run the game:

    python main.py

🎯 How to Play

Key Action
SPACE Flap / Start game
ESC Restart (after game over)

🛠️ Technical Details

  • Pygame Sprites — Uses pygame.sprite.LayeredUpdates for efficient rendering
  • Event-Driven — Custom events for pipe spawning
  • Collision Detection — Sprite-based collision checking
  • Asset Management — Centralized loading of sprites and audio

📸 Preview

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

📄 License

This project is open source and available under the MIT License.

👤 Author

Raul AbakarovGitHub | LinkedIn

About

FlappyBird Game

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages