Skip to content

mayankpal932-design/Flappy-Bird-Game-Javascript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🐦 Flappy Bird Game (JavaScript)

A simple Flappy Bird clone built using HTML, CSS, and JavaScript.
The game implements gravity-based movement, dynamic pipe generation, collision detection, and real-time score tracking using pure JavaScript DOM manipulation.


🎮 Features

  • 🕹 Bird jump control using keyboard input
  • 🌍 Gravity-based movement system
  • 🧱 Random pipe generation
  • 💥 Collision detection using bounding rectangles
  • 📊 Real-time score tracking
  • 🛑 Game over screen
  • 🔄 Restart game functionality
  • ⚡ Smooth animation using JavaScript intervals

🛠 Technologies Used

  • HTML5
  • CSS3
  • JavaScript (DOM Manipulation)
  • Game Loop using setInterval
  • Collision Detection using getBoundingClientRect()

⚙️ Game Logic

The game simulates physics using JavaScript intervals.
Gravity continuously pulls the bird downward while keyboard input allows upward movement. Pipes are generated dynamically, and collision detection is handled by comparing element boundaries using getBoundingClientRect().


🔗 Live Demo

https://mayankpal932-design.github.io/Flappy-Bird-Game-Javascript/


🚀 How to Play

  1. Press any key to make the bird jump.
  2. Avoid hitting pipes and boundaries.
  3. Pass through pipes to increase score.
  4. Game ends on collision.
  5. Click Restart to play again.

📁 Project Structure


👨‍💻 Author

Mayank Pal
Frontend Developer

GitHub: https://github.com/mayankpal932-design


⭐ If you like this project, consider giving it a star!

About

Flappy Bird clone built using HTML, CSS and JavaScript featuring gravity physics, collision detection, dynamic pipe generation and score tracking.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors