Creates spectacular cyan particle burst on absorption
Timer displayed in top-left corner
Strategic collection can enable risky maneuvers
Use Case: Navigate through tight gaps or recover from positioning mistakes
Points Power-Up (Green "+")
The Score Booster
Visual: Green circle with "+" symbol
Effect: Instant +5 points added to score
Mechanics:
Immediate score addition upon collection
Green particle explosion confirms collection
No duration—instant gratification
🎯 Controls
Key
Action
Context
SPACE
Jump / Start Game / Restart
Primary action button
A
Toggle AI Autopilot
Available anytime
P
Pause/Resume
Only during active gameplay
Control Philosophy
Minimal, intuitive controls ensure accessibility while maintaining gameplay depth. Single-button jump mechanic (SPACE) puts emphasis on timing and positioning rather than complex input combinations.
🏗️ Technical Architecture
Class Structure
FlappyBird (Main Panel)
The central orchestrator extending JPanel:
Implements ActionListener for game loop
Implements KeyListener for user input
Manages all game state and rendering
Coordinates between subsystems
Inner Classes
Bird Class
- Position tracking(x,y)
- Dimensions(width,height)
- Image reference
- Shield status and timer
- Represents player entity
- Position tracking(x,y)
- Dimensions(width,height)
- Image reference
- Shield status and timer
- Represents player entity
- Position tracking(x,y)
- Dimensions(width,height)
- Image reference
- Shield status and timer
- Represents player entity
Pipe Class
- Position and dimensions
- Image reference
- Passed flag(scoring)
- Shield usage tracking(collision system)
- Represents obstacle entities
- Position and dimensions
- Image reference
- Passed flag(scoring)
- Shield usage tracking(collision system)
- Represents obstacle entities
- Position and dimensions
- Image reference
- Passed flag(scoring)
- Shield usage tracking(collision system)
- Represents obstacle entities
PowerUp Class
- Position and size
- Type identifier(shield/points)
- Collection status
- Represents collectible entities
- Position and size
- Type identifier(shield/points)
- Collection status
- Represents collectible entities
- Position and size
- Type identifier(shield/points)
- Collection status
- Represents collectible entities
Particle Class
- Position and velocity vectors
- Size and color
- Lifespan counter
- Physics update method
- Represents visual effect entities
- Position and velocity vectors
- Size and color
- Lifespan counter
- Physics update method
- Represents visual effect entities
- Position and velocity vectors
- Size and color
- Lifespan counter
- Physics update method
- Represents visual effect entities