Lesson 6 V3

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Lesson Plan 6

Mini Game

Mathematical Skills / Concepts


Scratch Features
Curricular Links
Problem solving, Variables, Time
Variables, Sensing
Mathematics, Art, Language

These lesson plans are available for free download for personal and educational use thanks to a generous grant by ICS Skills. It is distributed under
a Creative Commons Attribution-Non Commercial-NoDerivs licence, which means that you are free to copy, distribute, and display the lesson
plans provided you make no changes to the content (including the attribution to the authors and these license terms); you may not use these lesson
plans for commercial purposes, and you may not alter, transform, or build upon this work. We encourage the use of this material in educational
settings, and you are welcome to print your own copy of the lesson plans. We welcome enquiries and suggestions, which should be directed to the
authors (see www.lero.ie/educationoutreach).

© 2019 Lero MMXIX:VI:VIII Version 3.01


Learning Objectives
The child will:
Teacher Tip
• Create a game which uses variables to calculate lives and score. If children are downloading
images or sounds from online,
• Use sensing to effect change in a game. be aware of copyright laws.
Encourage children to design
their own images.
Introduction
Create two sprites. Label one Good Guy and one Bad Guy

Type the Name of


the sprite here

Sensing Blocks
Sensing gives us a true or false response. We can then create scripts which do different things if
the answer is true or false.

• Write some code to make both sprites move around the screen.
• Click on the Good Guy script.
• Add the following blocks to your code.
This block give you space to put in a condition.

• Click on the sensing palette and select touching.


• Using the drop down arrow select bad guy. Alternatively you could select “when
touching colour”.


• These scripts will give us a true or false response i.e. Good Guy is touching Bad Guy
(True) or it is not touching (False).
• Now we can decide what will happen when the sprites touch. You can insert sound or
oks

2 |  Scratch Lesson Plan


• In the example we will change how the
sprite looks for 1 second and then return
it to normal.
• Changing the fisheye effect by -100 after
changing by 100 changes the sprite back
to its original state.
• We used a forever loop in this script. The
forever loop means that Good Guy will
ALWAYS react when he touches Bad
Guy, the script will keep running while the
program is active.

Challenge Time 1!
1. Choose two sprites and name them.
2. Add movement to each sprite.
3. Input the code from the image above to
one sprite.
4. Alter the code to create your own
effects.

Variables
Using the game we just created we will add lives to our Good Guy. We will start with 5 lives. Each
time the Bad guy touches the good guy he will lose a life.
• Click on the Good Guy sprite.
• Click on the variables palette.
• Click Make a variable.
• Call it “Lives”. This will appear on the stage.
• You will now see additional options in the
variables palette.
• Drag out “set lives to” and type 5 into the box.
• Add this to the start of your script.

Lesson 6  | 3
• Within the “if loop” we will change the • You will note that the lives will decrease
lives by minus one each time the Bad Guy by one each time. However, we need the
touches the Good Guy. game to end when the Good Guy has 0 lives
left. This will require another “if” statement,

Challenge Time 2!
1. Choose a sprite and name him Good Guy. If you wish to use your own names do!
2. Use the up, down, left and right arrows to move the sprite (recall Lesson 1).
3. Select another sprite and name him Bad Guy. Allow him to move randomly around the
screen when the green flag is pressed. (as for sprites in examples above).
4. Give the first sprite 5 lives.
5. Every time Bad Guy touches Good Guy, Good Guy should lose a life.
6. Allow your classmates to play your game. See who can keep their lives the longest!

Ultimate Challenge!
1. Plan a game on paper. It could be a chasing game as above, a maze or a football
game or your own idea.
2. Create the game, using movement, sound, sensing and lives.
3. In the project notes (File, Project notes) write the instructions for your game.
4. Have a look at other people’s games. Tell them what you like and suggest ideas to
make their game even better!

4 |  Scratch Lesson Plan


Notes

You might also like