Flappy Bird @ W&L
Flappy Bird+ is an ambitious reimagining of the FlappyBird but at Washington and Lee University famous colonnade with me as the Bird.
Sneak Peak
✨ Features
Progressive Difficulty System
The game intelligently adapts to your skill level:
Pipe velocity increases gradually as your score climbs
Velocity increment: +0.5 every 10 points
Maximum speed cap at -7 pixels/frame
Smooth difficulty curve ensures extended gameplay sessions
Combo System
Combo counter activates after passing 2+ pipes without touching the ground
Bonus scoring: Base 0.5 points + (combo multiplier × 0.5)
Example: 5-combo grants 3 bonus points per pipe (0.5 + 5×0.5)
Visual feedback with yellow combo indicator
Max combo tracking displayed on game over screen
Persistent High Score System
Your achievements are permanently saved:
Automatic high score detection and storage
Loads previous best score on game startup
Particle Effect Engine
Yellow particles: Successful pipe navigation
Cyan particles: Shield absorption of damage
Red particles: Collision/game over events
Physics-based particle behavior with gravity simulation
30-frame lifespan with alpha fade for smooth disappearance
Random velocity vectors create organic-looking effects
🎮 Game Mechanics
Physics Engine
The game implements a realistic gravity-based physics system:
Collision Detection
Axis-Aligned Bounding Box (AABB) collision system:
Precise hitbox detection for bird-pipe interactions
Separate collision detection for power-up collection
Shield system uses per-pipe collision tracking to prevent multi-frame triggering
Scoring System
Multi-layered scoring rewards skilled play:
Base Score: 0.5 points per pipe (1 point per pipe pair)
Combo Bonus: (combo × 0.5) additional points when combo > 2
Power-Up Bonus: +5 instant points from green power-ups
Example scoring at 10× combo:
Base: 0.5
Combo Bonus: 5.0
Total per pipe: 5.5 points
🔮 Power-Up System
Shield Power-Up (Blue "S")
The Guardian Angel
Visual: Cyan bubble surrounding the bird
Duration: 5 seconds OR until collision
Effect: Absorbs one pipe collision without triggering game over
Mechanics:
Per-pipe collision tracking prevents multi-frame bugs
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
ActionListenerfor game loopImplements
KeyListenerfor user inputManages all game state and rendering
Coordinates between subsystems
Inner Classes
Bird Class
Pipe Class
PowerUp Class
Particle Class
Game Loop Architecture
💻 Installation & Setup
Prerequisites
Java Development Kit (JDK) 8 or higher
Any Java IDE (IntelliJ IDEA, Eclipse, VS Code) or command line
Required Assets
Place these image files in the same directory as your Java files:
Compilation & Execution
Using Command Line:
Using IDE:
Create new Java project
Add
App.javaandFlappyBird.javato source folderAdd image assets to source folder
Run
App.java
📁 Code Structure
File Organization
Key Methods
Game Loop Methods:
actionPerformed()- 60 FPS update cyclemove()- Physics and collision processingdraw()- Rendering pipelinepaintComponent()- Swing rendering entry point
Gameplay Methods:
placePipes()- Pipe and power-up spawningautoPlayLogic()- AI decision makingcollision()- AABB collision detection (overloaded)updatePowerUps()- Power-up movement and collectionapplyPowerUp()- Power-up effect application
Utility Methods:
createParticles()- Particle effect generationupdateParticles()- Particle physics and cleanupsaveHighScore()- Persistent storageloadHighScore()- Data retrievalgetPowerUpColor()- Visual theminggetPowerUpSymbol()- Icon rendering