Make the Not Crossy Road game!
-
This game is similar to Apple Hunter because it has a main sprite avoiding a randomly moving evil sprite while collecting a prize that reappears in a different location when collected.
-
Strengthens concept of game screen coordinate system
-
The y- values of the location of the evil sprite(s) are limited, so they only move back and forth across the screen. The y- values of the prize are also limited, so it only shows up on certain sides of the screen.
-
-
Check out the code in the project below by going to the links and
pressing -
Model: https://scratch.mit.edu/projects/180324849/?fromexplore=true
-
This lesson is a lot of review, so the kids could code most of it themselves.
Basic Game
-
The player moves around with arrow keys to catch an apple. The bats floats around, and if it touches the payer, they lose. When the player collects an apple, the score increases and the apple moves to a new random location.
-
Teaches:
-
variables
-
-
Make the main sprite be able to move with the arrow keys.
-
Make the evil sprite move randomly, and program it so that if it
touches the main sprite, show that the player loses.-
Common problem for students: forgetting a forever loop
so the sprite is constantly checking if it's touching the other.
-
-
Make the prize appear in random locations after the main sprite
touches it. -
Make a variable that counts how many times the main sprite has touched/caught the prize.
-
“Variable”: shows up as as orange box in the top left of screen; holds a value (in this case, the score)
-
The programmer can set or change the value of a variable with the blocks that show up once it has been created
-
-
Make the variable “for all sprites”, so that code in any sprite can modify the variable
-
Lesson 3
-
Add backgrounds and/or sound
-
Make the sprites face their directions of travel
Scratch is developed by the Lifelong Kindergarten
Group at the MIT Media Lab. See http://scratch.mit.edu.
Apple Hunter
Simple Challenges
The first three steps were review- students could refer to past code.
Apple Hunter Game
Complex Challenge
Not Crossy Road Game
This challenge is for advanced students who finished the first game quickly.