Computer Science LearnITWithMrC ⛯ Year 7 Year 8 Year 9 GCSE

## What am I Learning today?

 I am learning how to create a moving Sprite I am learning how to use co-ordinates and xy values to manipulate a sprite

## Lesson

### NOTE: IT MUST BE YOUR OWN WORK!

Any code found to be plagerised without credit will get a 0

Make sure that you have your scratch Powerpoint Open

You can do that by clicking on the link below

We're going to create a script for a sprite to make it move across the screen. So start by selecting a sprite. You can use the cat or add a sprite from the costume Library

### Activity - Moving your Sprite.

• Use the example below to make a sprite move up and left.

### Can you make your sprit move down and right?

• Whenever we are coding graphics we need to use a co-ordinate system so that we know the position of the sprite on the screen.

Here is the co-ordinate grid for scratch

You can see that the centre of the screen has the co-ordiantes (0,0)

### Using co-ordinates with a sprite

Above you can see that the ball sprite is at co-ords (-100,100) and that I have created a script that will move the ball to the centre of the screen (0,0) when the green flag is clicked.

We can move our sprite with the Motion blocks

as we have already seen using the Move 10 steps block we used earlier.

Our challenge now is to move our sprite using the blocks below instead of the Move 10 steps block

Hint:

### Summing it all up

Lets look at the learning outcomes and decide which one best describes our current level of understanding :

Tick the one you feel is closest to your level

## Learning Outcomes I need to learn how to create a moving Sprite

• I have a basic understanding of how I can create a moving Sprite with a little help from my teacher
• I can show my teacher that I can create a moving Sprite without their help.
• I can create a moving Sprite independently and I can also explain it to others and can complete any extension tasks I am given.

## 🠜 Now update your learning objectivesClick on the Assessment image

We are now going to do some drawing in scratch. So first we need to delete our cat and add a new pencil sprite.

Then we need to edit our pencil costume so that the tip of the pencil points to the centre of the area.

Now add in the x-y grid backdrop

Move our pencil so that it goes to the co-ordinates (-100 , 100)

Then finally in scratch online to do our drawing we have to click on the extensions button (in the bottom left corner of the screen).

and click on the pen extension

Now we are ready to do some drawing !

## Other Shapes

Answer the questions below based upon your current understanding of the topic i.e. ( Red, Amber, Green ) :

• Write a program to create a line drawing of a triangle.
• Extend your program to draw the different types of triangle, right-angled, isosceles, equilateral and scalene.
• Write a program to use the keys to move the pencil so that you can create your own images.

### Summing it all up

Lets look at the learning outcomes and decide which one best describes our current level of understanding :

Tick the one you feel is closest to your level

## Learning Outcomes I need to learn how to use co-ordinates and xy values to manipulate a sprite

• I have a basic understanding of how I can use co-ordinates and xy values to manipulate a sprite with a little help from my teacher
• I can show my teacher that I can use co-ordinates and xy values to manipulate a sprite without their help.
• I can use co-ordinates and xy values to manipulate a sprite independently and I can also explain it to others and can complete any extension tasks I am given.