ZeroCode AI · Community
atharva_godbole_espressif
1 device by atharva_godbole_espressif, built with ESP ZeroCode AI and shared for anyone to flash.
Published
- Flappy BirdESP32 S3 box dock V1.0 display; M5 button module make a flappy bird game, game ends when bird hits a wall, on every button click the bird flies up, without button click Build a Flappy Bird game for my ESP32 board. HARDWARE - Board: ESP32 (change if different) - Display: 128x64 SSD1306 OLED over I2C (SDA = GPIO 21, SCL = GPIO 22) - Input: one push button on GPIO 4 (active LOW, internal pull-up, debounced) - Optional: passive buzzer on GPIO 5 for sound effects GAME RULES 1. A small bird sits at a fixed X position near the left side of the screen. 2. Gravity constantly pulls the bird down, and its speed increases the longer it falls. 3. Pressing the button makes the bird "flap": it gets a quick upward velocity boost. 4. Pairs of vertical pipes scroll from right to left at a constant speed. 5. Each pipe pair has a gap. The gap's vertical position is random, but the gap size is fixed. 6. The player scores +1 each time the bird passes a pipe pair. 7. The game ends if the bird hits a pipe, the ground, or the top of the screen. GAME STATES - START screen: shows "FLAPPY BIRD" and "Press button to start". - PLAYING: the game loop runs at about 30-60 FPS using non-blocking timing (millis), not delay(). - GAME OVER screen: shows the score and the high score. Pressing the button restarts the game. DETAILS - Draw the bird as a small sprite or a filled circle. - Draw pipes as filled rectangles. - Show the live score in the top corner during play. - Save the high score in non-volatile memory (Preferences/NVS) so it survives power-off. - Increase the difficulty slowly (e.g. pipes get slightly faster every 5 points). - Use constants at the top for gravity, flap strength, pipe speed, gap size, and pin numbers so they are easy to tune. OUTPUT - Give me the complete code, the libraries to install , the wiring table, and short upload instructions.
Built with ESP ZeroCode AI — describe a device, get production firmware.
Terms of Service · Privacy Policy