This is a simple Flappy Bird game built using Java and Swing. The player controls the bird to fly between sets of pipes by pressing the spacebar.
- Classic Flappy Bird gameplay mechanics.
- Smooth bird movement and pipe generation.
- Real-time score display.
- Game over and restart functionality.
-
Bird Movement:
- The bird's movement is controlled by the spacebar. Pressing the spacebar makes the bird jump.
- Gravity constantly pulls the bird down, so you need to keep pressing the spacebar to stay in the air.
-
Pipes:
- Pipes randomly appear from the right side of the screen and move leftwards.
- You score points by passing through the pipes without colliding.
-
Score:
- The score is displayed in the top-left corner.
- When the bird passes a pair of pipes, the score increases by 1.
-
Game Over:
- The game ends when the bird hits a pipe or falls off the screen.
- Pressing the spacebar after a game over will reset the game.
- Java Development Kit (JDK) installed on your machine.
-
Clone the Repository:
git clone https://github.com/Ganeshhhhh/Flappy_bird.git
-
Navigate to the Project Directory:
cd Flappy_bird
-
Compile the Java Files:
javac App.java
-
Run the Game:
java App
- Press the Spacebar to make the bird jump.
Feel free to submit issues or pull requests if you want to contribute to improving the game.