A simple Flappy Bird clone built using Java and FXGL, a game development framework for JavaFX.
- Player-controlled bird with gravity and flap mechanics
- Randomly spawning obstacles (pipes)
- Collision detection between player and obstacles
- Score tracking
- Game over state when the player hits an obstacle or falls off screen
- Clean and modular code structure (Entities, Components, Factory)
- Java 11+ (or any version supported by FXGL)
- Maven (optional, but recommended)
-
Clone the repository:
git clone https://github.com/LugolBis/FlappyBird.git cd FlappyBird -
Build and run the project:
- Using Maven:
mvn clean javafx:run
- Or directly from your IDE by running
App.java.
- Using Maven:
| Key | Action |
|---|---|
SPACE |
Flap upward |
UP ARROW |
Flap upward |
The player controls a bird that automatically falls due to gravity. Pressing SPACE or the UP ARROW makes the bird flap upward. Avoid hitting the pipes and try to achieve the highest score possible.