Shark Food
Shark Food Part 1
Introduction: Shark Food Part 1
Step 1: Setting Up Our Variables
Step 2: Initializing Our Variables When the Game Starts
Step 3: Checking for a High Score
Step 4: Moving the Shark
Step 5: Creating Initial Fish Behavior
Step 6: Adding Rock Collision
Step 7: Creating New Variables for the Rocks
Step 8: Finishing the Initial Rock Behavior
Step 9: Making the Game Over Screen Appear
Shark Food Part 2
Introduction: Shark Food Part 2
Step 1: Creating Variables for the Fish
Step 2: Initializing the Fish’s Speed
Step 3: Moving the Fish
Step 4: Making the Fish Bounce
Step 5: Creating Variables for the Rocks
Step 6: Initializing the Rock Speed
Step 7: Moving the Rocks
Step 8: Making the Rocks Bounce
Shark Food Part 3
Introduction: Shark Food Part 3
1 of 2
Previous Lesson
Next Lesson
Step 8: Making the Rocks Bounce
Shark Food
Step 8: Making the Rocks Bounce
Goal:
Now we want the rocks to bounce around the game screen, similar to the fish in the game!
Steps:
Still on the
“Rocks”
sprite, create the shown code.
From
Motion,
place a
glide
block and set the number
2
and the right side to
random position.
Code:
Previous Lesson
Back to Course
Next Lesson