frogger game

by fmpirozzoli
See Code Download Embed
The frog is controlled by the up, down, left and right arrow keys using four when statements. 

After, flag is pressed if space key is pressed the sprites begin. 

The log and car sprites initially glide across the screen and then after a wait, clones are created and the glide across the screen continuously. Once a clone moves off the stage it is deleted. 

Inside the game loop is a series of if statments inside a forever loop. The statments check if the frog is in either river and not on a long, touching a car, or moved off the screen. In any of these cases the frog loses a life and is reset. 
If the frog is on a log its x-position changes by 2 in the direction of the log. 

Every three frogs that make it across (touch the star) the game speeds up a little. Logs are faster and theres a longer delay, so they spread out more. Cars move faster and are more frequent. 

Created March 28, 2023

Last updated May 1, 2023

Shared March 29, 2023