Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Make A Flappy Bird Game using JavaScript & P5.js framework
Rating: 4.6 out of 5(10 ratings)
53 students

Make A Flappy Bird Game using JavaScript & P5.js framework

Learn Coding By Making Classic Games
Created bySaran Siri
Last updated 9/2020
English

What you'll learn

  • Be able to declare and assign variables in JavaScript
  • Be able to use conditional statement and gravity in JavaScript
  • Be able to understand the foundation of 2D game including the setup and draw cycle
  • Be able to apply new idea to the existing game

Course content

1 section12 lectures38m total length
  • Introduction0:52
  • Basics7:02
  • Bird2:52

    Define a Bird class in JavaScript with x and y coordinates and a size, implement a draw method using ellipse, and render it in a p5.js sketch.

  • Drop3:39

    Update position with velocity and acceleration to simulate gravity, then apply gravity in the bird class, set a floor at 90% height, and stop movement on contact.

  • Flap3:07
  • Death4:14

    Create a health variable to kill the bird on floor or off-screen, preventing jumps when dead, and display a centered 'game over' in black. Add a reset function to restart.

  • Pipe3:35
  • Illusion4:00
  • Collision3:09
  • Score3:01

    Implement score tracking in a Flappy Bird game using JavaScript and p5.js, updating the bird's score and its hiscore as pipes are passed and displaying them on screen.

  • Final Touch2:24
  • Share0:43

Requirements

  • Basic knowledge of JavaScript or coding in general
  • Basic knowledge of web browser

Description

Make a simple, easy-to-follow, classic Flappy bird game, using javascript and p5 framework. We will be using a free online editor that runs on any web browser.

I will show you how to:

  • draw basic shapes, and make an object move.

  • draw a bird, make it drop to the ground by simulating the gravity.

  • make the bird jump, and also make it stop jumping when it is dead.

  • create moving pipes, and add a collision detection to the pipe.

  • add a score system, and make it harder.

You can follow me for more game tutorials. Now let’s open the next lesson, and get started!

Who this course is for:

  • Anyone who wants to learn coding
  • Anyone who loves games and wants to make games