Loading...
Hello, my name is Mrs. Holbro.
I'm so pleased that you've decided to join me for your lesson today.
We're gonna have lots of fun learning how to programme sprites.
Welcome to today's lesson from the unit Programming Sequence Using Sound.
This lesson is called Programming Sprites and by the end of today's lesson, you'll be able to identify that all commands have an outcome.
You'll need to have access to Scratch for this lesson and it would be helpful if you had your worksheet ready.
We will be exploring these key words during today's lesson.
Motion, motion, the movement of an object over time.
Stage, stage, the background of a project.
Random, random, cannot be predicted.
We'll be using these keywords throughout today's lesson.
Okay, let's make a start on the first part of today's lesson by looking at how we can control multiple sprites using separate commands.
Motion blocks can be used to control the movement of a sprite.
Motion blocks are blue.
Here are some common motion blocks.
Turn clockwise 15 degrees, move 10 steps, turn anti-clockwise 15 degrees.
Multiple sprites can be controlled using separate motion commands.
Watch the three animals carefully.
How do they move? Let's see if you can tell which movement block is controlling which sprite.
Draw a line from the sprite to the code block that is controlling it.
Pause the video and have a think.
How did you get on? The clownfish is being controlled by the move 10 steps block.
The crab is being controlled by the turn clockwise 15 degrees block and the puffer fish is being controlled by the turn anti-clockwise 15 degrees block.
Did you get it right? A project can contain multiple sprites.
To add a new sprite, click on the choose a sprite button, which is represented by the cat and addition symbol icon and then select the sprite you want to use.
If you want to use commands with a sprite, it must be selected.
This is really important if you have more than one sprite in a project, because you may accidentally add commands to the wrong sprite.
Great listening so far.
Let's check your understanding.
To add a code block to a sprite, you must, A, make sure the sprite is selected.
B, delete the sprite or C, make sure the backdrop is selected.
Pause the video and have a think.
That's correct.
The answer is A, you must make sure the sprite is selected before you add a code block.
Now it's your turn to have a go at making a project.
Open a new scratch project and add these three sprites.
The penguin, the dog and the frog.
Pause the video whilst you complete the task.
Now add the following motion to each sprite.
The frog should move 10 steps.
The penguin should turn clockwise.
The dog should turn anti-clockwise.
Pause the video whilst you complete the task.
For the final part of task A, you should add two more sprites and two motion blocks of your choice to control them.
Explain which sprites and motion blocks you added using the table on your worksheet.
Pause the video whilst you complete the task.
How did you get on? Let's watch this animation to see how to correctly add motion blocks to each sprite.
Remember, the frog should move 10 steps.
The penguin should turn clockwise and the dog should turn anti-clockwise.
In the final part of task A, you were asked to complete the table.
Here's an example of an answer.
The sprite that was added was called Ladybird one.
The turned clockwise 15 degrees motion block was used to move the Ladybird clockwise 15 degrees.
You are doing so well.
It's now time for the second part of today's lesson.
We are now going to use the random position motion commands.
The stage is where sprites will perform the actions of the blocks.
The stage is this section on the right hand side of the screen.
This is useful as you can preview what your sprite does and check if it's working as you expected.
You can change the appearance of a project by adding a backdrop to your stage.
Let's watch the animation to see how this is done.
Shall we check your understanding of how to add backdrops? Which of these icons would you use if you want to add a new backdrop to your stage? A, B or C? Pause the video and have a think.
Well done.
C is the correct answer.
So far, you have seen how to add movement to a sprite using these motion code blocks, move 10 steps, turn clockwise 15 degrees and turn anti-clockwise 15 degrees, but Laura wants to know what she should do if she wants the sprite to move differently.
Ah, here is Jacob.
Jacob is suggesting, these motion blocks can be used to make a sprite go to another location on the stage, but these two blocks both use the words random position.
What does this mean? In Scratch, some motion code blocks make a sprite go to a random position.
This means that a sprite will appear at any spot on the stage which cannot be predicted and if the programme is run a few times, it is likely that the sprite will appear in a different spot each time.
Great listening so far.
Well done.
Time for a check.
Using a random position motion code block means you can set exactly where you want a sprite to go on the stage.
Is this true or false? Pause the video and have a think.
Well done.
It's false.
This is because the random position motion code block will make a sprite appear at any spot on the stage which cannot be predicted.
This animation shows how you can add random motion code blocks to sprites.
Watch how the sprites move when the commands are run.
You are doing great and it's now time for you to have a go.
Open a new scratch project and add the dinosaur and egg sprites.
Pause the video whilst you complete the step.
Now add the Jurassic backdrop.
Pause the video whilst you complete the step.
Now follow this design to create your project and complete the table on your worksheet to explain the code block you have used.
You need to make the egg appear in a random position.
You then need to make the dinosaur move 10 steps and then you need to make the egg turn 90 degrees clockwise.
Pause the video whilst you complete the step.
Now for the final steps of task B, develop your project to make the dinosaur move towards the egg to investigate it.
You will need this code block that you haven't used before, go to egg, pause the video whilst you complete the step.
Finally, can you explain what the word random in the motion code block means? Pause the video to have a think and record your answer on your worksheet.
How did you get on? Did you manage to get both the dinosaur and the egg sprite added to your project? Well done.
This table shows the answers for step three.
To make the egg appear in a random position, the go-to random position code block has been used.
The move 10 steps block has been used to make the dinosaur move and finally, the turn clockwise 90 degrees block has been used to turn the egg.
Did you manage to make the dinosaur move towards the egg? Great work.
Here is an example answer to explain what the word random in the motion code block means.
The sprite will go to an unplanned place on the stage.
This will be different each time the code is run and cannot be predicted.
You have worked so hard today and I hope you've enjoyed creating your projects.
Let's summarise what we have learned today.
Multiple sprites can be added to a project and they can each be controlled using separate motion commands.
The stage is where sprites perform the actions of the blocks.
The appearance of a stage can be changed using a backdrop and the random position can be used in motion blocks to make a sprite move in an unpredictable way.
Great work, hope to see you again soon.
Bye.