Skip to content

abdullahaziz723/Flappy_bird

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

8 Commits
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿฆ Flappy Bird โ€“ Java Swing Edition

A fun and lightweight recreation of the classic Flappy Bird game built using Java Swing. This project demonstrates the use of graphics, event handling, and game loops in Java.


๐ŸŽฎ Features

  • Smooth game loop using javax.swing.Timer
  • Bird character that responds to keyboard input (SPACE to jump)
  • Randomly placed pipe pairs as obstacles
  • Scrolling environment with realistic gravity and movement
  • Simple collision logic (expandable)
  • Object-oriented structure with custom Bird and Pipe classes

๐Ÿ›  Technologies Used

  • Java (JDK 8 or higher)
  • Java Swing for UI rendering
  • AWT for basic graphics and image loading
  • OOP principles (encapsulation, modular design)

๐Ÿš€ Getting Started

Prerequisites

  • Java JDK 8 or higher
  • IDE like IntelliJ / VS Code / Eclipse

Installation

  1. Clone the repository

    git clone https://github.com/your-username/flappy-bird-java.git
    cd flappy-bird-java
  2. Make sure the assets are correctly placed Place all your game images inside:

    /src/assets/
    โ”œโ”€โ”€ flappybird.png
    โ”œโ”€โ”€ flappybirdbg.png
    โ”œโ”€โ”€ toppipe.png
    โ””โ”€โ”€ bottompipe.png
    
  3. Run the game

    • Open App.java (your main class) and run it.
    • Make sure your project root includes /src in the classpath.

๐Ÿ•น Controls

Key Action
SPACE Make the bird jump

๐Ÿงฉ Game Logic Overview

  • Pipes are added every 1.5 seconds with random vertical gaps.
  • Bird is affected by gravity and can jump when spacebar is pressed.
  • Game runs at ~60 FPS using a javax.swing.Timer.

๐Ÿ™Œ Credits

  • Original Flappy Bird concept by Dong Nguyen

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages