What will you learn in this lesson?
-
Build a Flappy Bird game:
Create a game where the player controls a bird trying to fly between pairs of green vertical pipes without touching them.
-
Use the "message" block: Learn how to use the "message" block for creating
and managing the game.
-
Use the "Start on Bump" block: Learn how to detect when the bird touches pipes
-
Use the "Start on Tap" block: Learn how to control bird hight using the mouse cursor.
-
Use the "Go to Page" block: Learn how to move between different scenes in the game.
Draw in the graphic editor:
-
3 sprites of columns with a rectangle above them
-
3 sprites of columns with a rectangle below them
It is important to give each sprite a name
Add the background "Savannah"
-
Remove the existing trees from the scene.
-
Add a brown rectangle at the bottom of the screen, likely to represent the ground
Add the bird sprite
Add by drawing triangular sprites "up" and "down"
Place the 9 pipes sprites as they are positioned in the picture
Build the left-scrolling script for all the pipes sprites
Build the script for the bird
Build the 'control script' with 2 arrows that control the bird's height
Add new slide number 2 "End"
Add the "Savannah" background to slide 2
Add the 2 titles:
-
"end"
-
"to restart click on the character of Tick"
Add a script to the 'Tic' sprite in slide 2 so that touching the 'Tic' sprite will restart the game.
Run the script by clicking on the green flag. Use the arrows at the bottom of the screen to control the height of the bird