Scratch - Frogger Game

From WLCS

Objective:

  • You will create a game that allows a player to travel around the screen
  • The player will be able to move around
  • The player must also avoid cars or enemies going back and forth
  • The player wins when he/she reaches the end
  • The player loses a life when he/she hits an enmy

Requirements

  1. Give your game a simple background
  2. Have your stage play some background music
  3. You will need several sprites.
  4. 1 player sprite will be the player and it will cross the screen by using the keyboard.
  5. 5 enemy sprites will be used to move back and forth horizontally or vertically across the screen (the number depends on how big you make them)
  6. When you play your game, you want to cross the entire screen without hitting the enemy sprites.
  7. Start the player off with 3 lives (HINT: use a variable)
  8. If you hit any of the enemy sprites:
    1. Subtract one life away
    2. Play a sound effect of getting hit
    3. Say "Ouch!"
    4. Move the player back to its starting location
  9. If lives hits 0, then say "Game Over" and end the game
    1. Play a sound effect for the "Game Over"
  10. If the player reaches the other side of the screen, then say "You win!"
    1. Play a sound effect for winning
    • Hint: You can use all sorts of different ways to detect how you hit the other side of the screen
    • Create a long sprite that you detect hitting OR...
    • Check the y-coordinate of the sprite and if it is greater than the upper bound of the screen

Additional Bonus Features:

  • Add bonus items that give back lives to the player
  • The enemy sprites constantly change costume back and forth (makes it look like they're moving)
  • Add increasing difficulty levels
    1. Create a variable for the level number that starts at 1
    2. Create speed variables for each enemy sprite
    3. When the player finishes the level, increase the level number
    4. Reset the player and sprites
    5. Use if-statements in all the sprites to check what level it is and change their speed accordingly
  • Add sprites that move across the screen that need to be used to cross the street (e.g. a moving log that the frog can jump on)