Fly Trap

Leaping lizards, this frog is hungry! Help him catch some flies before they fly away and protect him from raining lilypads!


Play this demo in full screen.

1) Set the backdrop and create your frog sprite.


Play this demo in full screen.

2) Make the frog move in all directions when the arrow keys are pressed.


Play this demo in full screen.

3) Draw a line to make the frog's tongue. Start the line at the frog's position.


Play this demo in full screen.

4) Make the starting position of the frog's tongue always be the same position as the frog. Send the tongue back a layer.


Play this demo in full screen.

5) When the space key is pressed, make the frog's tongue grow.


Play this demo in full screen.

6) When the space key is released, make the frog's tongue shrink back towards the frog until it is at its original position.


Play this demo in full screen.

7) If the frog's tongue reaches the top of the screen, make it go back to where it started.


Play this demo in full screen.

8) Create a fly sprite, and place it on the left side of the screen in a random spot.


Play this demo in full screen.

9) Make the fly move across the screen.


Play this demo in full screen.

10) If the frog's tongue touches the fly, bring the fly back to another random spot on the left side of the screen and have it move across the screen again.


Play this demo in full screen.

11) Create a score variable that goes up every time the frog's tongue touches a fly. Display the score on the screen.


Play this demo in full screen.

12) Create a lilypad sprite that falls from a random spot at the top of the screen. When it reaches the bottom, make it go back to a random spot at the top and fall again.


Play this demo in full screen.

13) If the lilypad touches the frog, or if the fly gets to the right side of the screen without being touched by the frog's tongue, end the game.


Play this demo in full screen.

14) Make the game harder by increasing the fly's speed over time.


Play this demo in full screen.

15) Display instructions for how to play the game on the screen. Show them for only a few seconds.


Play this demo in full screen.