Flappy Birds Clone in 10 minutes

Step 6

We now need to make the background scroll to give the effect the bird is flying to the right. Create a new event, "System" and under "General" select "Every tick". For the action, select "Pipe Bottom" and under "Size & Position" select "Set X". Type in "Pipebottom.X - 5". Add 3 more actions that do the same for "Pipetop" and both the background floor objects. This means that every tick, these objects will move to the left 5 pixels.

If you run the game now, you'll see the floor moving to the left but it eventually runs out! To fix this add another two events. Click "Add Event" and select the yellow tiled background. Click "Compare X" and enter "Less or equal to -560" (minus 560). For the action, set the yellow floors X to "0".

Do the same for the green floor object except the comparison should be for "Less or equal to -410".

Preview the game, the background should be scrolling infinitely if you keep in the layout!

  • 0 Comments

  • Order by
Want to leave a comment? Login or Register an account!