JS and HTML project
A simple Flappy Bird clone built using HTML5 Canvas and Vanilla JavaScript. This project is a fun implementation of basic game development concepts including sprite movement, collision detection, gravity simulation, and event handling.
- Press
Space,Arrow Up,X, orEnterto make the bird jump. - Avoid the pipes.
- The game ends if the bird hits a pipe or falls off the screen.
- Press
Enteror any jump key again to restart the game.
- Smooth gravity-based movement
- Randomly generated pipes
- Collision detection
- Score tracking
- Basic game reset functionality
index.html– Main HTML file containing the canvas element.game.js– JavaScript logic for game loop, physics, collision detection, and UI.flappybird.png– Sprite for the bird.toppipe.png– Image for the upper pipe.bottompipe.png– Image for the lower pipe.
(Add your own screenshot here if you like)
- A modern web browser (Chrome, Firefox, Edge, etc.)
- No additional libraries required
- Clone the repository or download the files.
- Make sure the following files are in the same folder:
index.htmlgame.jsflappybird.pngtoppipe.pngbottompipe.png
- Open
index.htmlin your browser. - Start playing!
- Add sound effects
- Improve graphics with animations
- Add difficulty levels
- Create a mobile version
- Add high score tracking
This project was created by [Your Name] as part of learning JavaScript and canvas-based game development.
This project is free to use and modify for learning purposes.