External Exam Download Resources Web Applications Games Recycle Bin

Flappy Ball

SpriteImages
sprFlappyBall

ObjectSpriteProperties
objFlappyBallsprFlappyBallVisible

room layout:

objFlappyBallCreate event

objFlappyBallKey Press → Space event

extension activities:

  1. complete the add a pipe activity below first
  2. can you add pipes at the top of the screen?

add a pipe
SpriteImages
sprPipe

ObjectSpriteProperties
objPipesprPipeVisible, Solid
objPipeCreate event
make pipe move left to give illusion of flying right:


objPipeStep event
if pipe disappears off-screen, then make it reappear on other side:

Same height pipes:



Alternating height pipes:


objFlappyBallCollision → objPipe event
if flappy-ball hits pipe, then exit the game: