Flap Bird

FEI786202/jogo-nicolas4pitz

A simple game built with HTML and JavaScript, recreating the classic Flappy Bird experience directly in the browser.

The game is rendered using <canvas> elements and image assets, while JavaScript handles all core game logic — including gravity simulation, player movement, object generation, and collision detection. The result is a smooth, lightweight, and responsive browser game that captures the essence of the original mobile hit.

Features

  • 🐦 Core Mechanics: Physics-based gameplay with gravity and jump control.
  • 🎮 Dynamic Objects: Pipes and backgrounds are procedurally generated for each round.
  • ⚙️ Collision System: Real-time hit detection between the bird and obstacles.
  • 🖥️ Canvas Rendering: Optimized 2D rendering using HTML5 Canvas API.

Technologies Used

  • HTML5 Canvas — for rendering the game loop and visual elements.
  • JavaScript (ES6) — for handling physics, animation, and interactivity.
  • CSS3 — for layout and responsive scaling.

How It Works

  1. The bird is affected by a gravity constant that continuously pulls it downward.
  2. When the player presses a key (or taps the screen), an upward velocity is applied.
  3. Pipes are generated at random intervals and move horizontally to simulate motion.
  4. Collision detection checks whether the bird intersects any pipe or the ground.
  5. Each successful pass through a gap increases the score.

Future Improvements

  • Add a start menu and game-over screen with restart functionality.
  • Implement sound toggle and difficulty settings.
  • Add score storage using localStorage or a backend API.
  • Improve sprite animations for smoother character motion.

Summary

This project demonstrates fundamental game development concepts in JavaScript, such as physics simulation, animation loops, and real-time collision detection. It’s a great example of how simple HTML5 and JS logic can create an engaging, nostalgic web-based game experience.