Week 5 Lesson 2
Today we will learn how if-thens and variables work in computer games.
55 minutes
1 - Warm Up (5 min)
2 - We Do (5 min)
3 - Turn & Talk (5 min)
4 - UCSD Does (5 min)
5 - We Do (15 min)
6 - You Do (15 min)
7 - Reflect & Share (5 min)
WARM UP
Pairs, Groups,
Whole Class
1
(5 min)
Let's think about how we use our senses to give us information.
What sounds might you hear that would cause you to do something?
If I heard _________, then I would__________.
What might you see that would cause you do something?
If I saw _________, then I would__________.
WE DO
2
(5 min)
As a class, let's use TIPP and SEE to learn how the project works.
Click on the Scratch project.
Locate the Title and read it.
Locate the Instructions and read them.
Locate the Purpose and read it.
Play the project.
Locate See Inside and click on it.
Identify all Sprites and Events.
Explore the code.
Turn & TALK
3
(5 min)
In the Scratch project, the user needs to keep the cat away from the dog! However, the game could use some improvements. What could make this game better?
I think this game could be better by _________.
One idea I have is to program _________.
How is the sensing block used in the game? Use the anchor chart to help you explain.
In this project, when the dog sprite touches the cat _____________.
UCSD DOES
4
(5 min)
you do
6
(15 min)
Open the Week 5 Student Hyperdoc provided by your teacher.
Open the project under the "You Do" section in your hyperdoc.
Play the project.
Add code that decreases the cat's lives every time they're caught by the dog!
Create levels that makes the dog move faster.
Change the backdrop to reflect the new levels.
do MORE
Can you make the cat jump to a random place after it is caught?
Can you add a "game over" screen when the cat runs out of lives?
Make sure you have shared your project with your teacher using your hyperdoc.
File -> Save to your computer to save your program for later.
(How To)
Reflect & Share
7
(5 min)
Today in Scratch, we used sensing blocks to make the score change when the dog touches the cat. The variable kept the score.
Partner A: Share your project and talk about your process.
Today I _______. Let me show you...
Partner B: Respond to your partner with feedback.
I can tell you worked hard on ________ because ________.
I think ________ could be even better if you ________.
Switch roles!