Page 1
Lesson
Programming Multiple Sprites in Scratch
3
In this lesson you will learn:
To demonstrate actions like games, in Scratch.
To program coordination between various Sprites.
m Ai
Tejas: We want to animate two Sprites playing
throw ball.
Moz: How is this game played?
Tejas: I throw the ball and Jyoti catches
it. Next Jyoti throws and I have to
catch it. Many players can also play this
game together.
Moz: Good! Now, plan the Scratch
project for the game.
Jyoti: Let us start with two players. So
we need two Sprites.
Tejas: We need one more Sprite- the ball.
Jyoti: Let us have a playground as the Background.
Moz: Ok. Now list out what you need. Are you painting or importing the
Sprites?
Tejas: We can import the ball and paint the two players.
Jyoti: Let us import the ‘playground’ for the Background.
What we need?
3 Sprites (two players, one ball).
One Background.
Page 2
Lesson
Programming Multiple Sprites in Scratch
3
In this lesson you will learn:
To demonstrate actions like games, in Scratch.
To program coordination between various Sprites.
m Ai
Tejas: We want to animate two Sprites playing
throw ball.
Moz: How is this game played?
Tejas: I throw the ball and Jyoti catches
it. Next Jyoti throws and I have to
catch it. Many players can also play this
game together.
Moz: Good! Now, plan the Scratch
project for the game.
Jyoti: Let us start with two players. So
we need two Sprites.
Tejas: We need one more Sprite- the ball.
Jyoti: Let us have a playground as the Background.
Moz: Ok. Now list out what you need. Are you painting or importing the
Sprites?
Tejas: We can import the ball and paint the two players.
Jyoti: Let us import the ‘playground’ for the Background.
What we need?
3 Sprites (two players, one ball).
One Background.
Moz: How does the game start?
Tejas: We have to make them stand opposite to each other at the start of
the game.
Jyoti: Yes. And both have to stand at some distance apart.
Tejas: How can we make the Sprite stand in one position at the start of
the game?
Moz (points to the Current Sprite Info window): Look at this. What is the
number next to x and y?
Jyoti: x: 0 and y: 0.
Moz: Where is the Sprite on the stage?
Jyoti: At the centre of the stage.
Current Sprite Info
Page 3
Lesson
Programming Multiple Sprites in Scratch
3
In this lesson you will learn:
To demonstrate actions like games, in Scratch.
To program coordination between various Sprites.
m Ai
Tejas: We want to animate two Sprites playing
throw ball.
Moz: How is this game played?
Tejas: I throw the ball and Jyoti catches
it. Next Jyoti throws and I have to
catch it. Many players can also play this
game together.
Moz: Good! Now, plan the Scratch
project for the game.
Jyoti: Let us start with two players. So
we need two Sprites.
Tejas: We need one more Sprite- the ball.
Jyoti: Let us have a playground as the Background.
Moz: Ok. Now list out what you need. Are you painting or importing the
Sprites?
Tejas: We can import the ball and paint the two players.
Jyoti: Let us import the ‘playground’ for the Background.
What we need?
3 Sprites (two players, one ball).
One Background.
Moz: How does the game start?
Tejas: We have to make them stand opposite to each other at the start of
the game.
Jyoti: Yes. And both have to stand at some distance apart.
Tejas: How can we make the Sprite stand in one position at the start of
the game?
Moz (points to the Current Sprite Info window): Look at this. What is the
number next to x and y?
Jyoti: x: 0 and y: 0.
Moz: Where is the Sprite on the stage?
Jyoti: At the centre of the stage.
Current Sprite Info
Moz: Now move the Sprite to the bottom-left corner of the stage. Check
x and y again.
Tejas: Oh! Look, now it is x: -159 and y: -82.
Jyoti: Why is x -159? What does it mean?
Moz: Look at this figure. Consider this as
Scratch Stage. What do you observe?
Jyoti: The stage is divided into four squares by a horizontal line
and a vertical line.
Tejas: They are also numbered.
Moz: Good observation. The four squares are called four quadrants.
Moz: Now move the mouse pointer to each
corner of the stage and note x and y values.
Tejas: The top right corner has x:240 and
y:180 but the top left corner has x -240 and
y:180.
Info
Current Sprite Info shows a Sprite’s name, x-y position and direction.
You can also type in a new name for the Sprite.
Direction indicates how the Sprite will turn when it executes a move
instruction.
Direction: 0 = up
Direction: 90 = right
Direction: 180 = down
Direction: -90 = left
The horizontal line is labeled the x-axis and the vertical line is
labeled the y-axis.These two axes divide the Stage into four
quadrants.
The point at which the two axes meet is the center of the Stage
and is called the origin. The origin has x:0 and y:0.
CONCEPTS
Current Sprite Info
Page 4
Lesson
Programming Multiple Sprites in Scratch
3
In this lesson you will learn:
To demonstrate actions like games, in Scratch.
To program coordination between various Sprites.
m Ai
Tejas: We want to animate two Sprites playing
throw ball.
Moz: How is this game played?
Tejas: I throw the ball and Jyoti catches
it. Next Jyoti throws and I have to
catch it. Many players can also play this
game together.
Moz: Good! Now, plan the Scratch
project for the game.
Jyoti: Let us start with two players. So
we need two Sprites.
Tejas: We need one more Sprite- the ball.
Jyoti: Let us have a playground as the Background.
Moz: Ok. Now list out what you need. Are you painting or importing the
Sprites?
Tejas: We can import the ball and paint the two players.
Jyoti: Let us import the ‘playground’ for the Background.
What we need?
3 Sprites (two players, one ball).
One Background.
Moz: How does the game start?
Tejas: We have to make them stand opposite to each other at the start of
the game.
Jyoti: Yes. And both have to stand at some distance apart.
Tejas: How can we make the Sprite stand in one position at the start of
the game?
Moz (points to the Current Sprite Info window): Look at this. What is the
number next to x and y?
Jyoti: x: 0 and y: 0.
Moz: Where is the Sprite on the stage?
Jyoti: At the centre of the stage.
Current Sprite Info
Moz: Now move the Sprite to the bottom-left corner of the stage. Check
x and y again.
Tejas: Oh! Look, now it is x: -159 and y: -82.
Jyoti: Why is x -159? What does it mean?
Moz: Look at this figure. Consider this as
Scratch Stage. What do you observe?
Jyoti: The stage is divided into four squares by a horizontal line
and a vertical line.
Tejas: They are also numbered.
Moz: Good observation. The four squares are called four quadrants.
Moz: Now move the mouse pointer to each
corner of the stage and note x and y values.
Tejas: The top right corner has x:240 and
y:180 but the top left corner has x -240 and
y:180.
Info
Current Sprite Info shows a Sprite’s name, x-y position and direction.
You can also type in a new name for the Sprite.
Direction indicates how the Sprite will turn when it executes a move
instruction.
Direction: 0 = up
Direction: 90 = right
Direction: 180 = down
Direction: -90 = left
The horizontal line is labeled the x-axis and the vertical line is
labeled the y-axis.These two axes divide the Stage into four
quadrants.
The point at which the two axes meet is the center of the Stage
and is called the origin. The origin has x:0 and y:0.
CONCEPTS
Current Sprite Info
Moz: Correct. What else do you observe about x and y values?
Jyoti: As we move to the right from the origin, the x-value
increases from 0 to 240. As we move left from the origin, the
x-value changes from 0 to -240.
Tejas: Similarly, as we move up from the origin, the y-value
increases from 0 to 180. As we move down from the origin,
the y-value changes from 0 to -180.
Moz: Very good.
Moz: Let us look at an example of this in real life. Jyoti, you stay in a four
stored building. Isn’t it?
Jyoti: Yes. I stay on 4C. On each floor we have four houses. The horizontal
line x, which represents houses on each floor, has values A, B, C,
D. The vertical line y, which represents the floors, has values
1, 2, 3, 4.
Tejas: Then the address of the 3rd house in the second
floor is 2C.
4
3
2
1
A B C D
Jyoti’s House
Each point on the stage is represented by two numbers. In
Scratch, these numbers are called x and y values.
CONCEPTS
Moz: Good. Now, get back to the Scratch instructions.
Tejas: We have to move the Sprite to a particular position on the stage at
the start of the game.
Moz: In which block will you find the movement instructions?
Jyoti: Motion block.
Page 5
Lesson
Programming Multiple Sprites in Scratch
3
In this lesson you will learn:
To demonstrate actions like games, in Scratch.
To program coordination between various Sprites.
m Ai
Tejas: We want to animate two Sprites playing
throw ball.
Moz: How is this game played?
Tejas: I throw the ball and Jyoti catches
it. Next Jyoti throws and I have to
catch it. Many players can also play this
game together.
Moz: Good! Now, plan the Scratch
project for the game.
Jyoti: Let us start with two players. So
we need two Sprites.
Tejas: We need one more Sprite- the ball.
Jyoti: Let us have a playground as the Background.
Moz: Ok. Now list out what you need. Are you painting or importing the
Sprites?
Tejas: We can import the ball and paint the two players.
Jyoti: Let us import the ‘playground’ for the Background.
What we need?
3 Sprites (two players, one ball).
One Background.
Moz: How does the game start?
Tejas: We have to make them stand opposite to each other at the start of
the game.
Jyoti: Yes. And both have to stand at some distance apart.
Tejas: How can we make the Sprite stand in one position at the start of
the game?
Moz (points to the Current Sprite Info window): Look at this. What is the
number next to x and y?
Jyoti: x: 0 and y: 0.
Moz: Where is the Sprite on the stage?
Jyoti: At the centre of the stage.
Current Sprite Info
Moz: Now move the Sprite to the bottom-left corner of the stage. Check
x and y again.
Tejas: Oh! Look, now it is x: -159 and y: -82.
Jyoti: Why is x -159? What does it mean?
Moz: Look at this figure. Consider this as
Scratch Stage. What do you observe?
Jyoti: The stage is divided into four squares by a horizontal line
and a vertical line.
Tejas: They are also numbered.
Moz: Good observation. The four squares are called four quadrants.
Moz: Now move the mouse pointer to each
corner of the stage and note x and y values.
Tejas: The top right corner has x:240 and
y:180 but the top left corner has x -240 and
y:180.
Info
Current Sprite Info shows a Sprite’s name, x-y position and direction.
You can also type in a new name for the Sprite.
Direction indicates how the Sprite will turn when it executes a move
instruction.
Direction: 0 = up
Direction: 90 = right
Direction: 180 = down
Direction: -90 = left
The horizontal line is labeled the x-axis and the vertical line is
labeled the y-axis.These two axes divide the Stage into four
quadrants.
The point at which the two axes meet is the center of the Stage
and is called the origin. The origin has x:0 and y:0.
CONCEPTS
Current Sprite Info
Moz: Correct. What else do you observe about x and y values?
Jyoti: As we move to the right from the origin, the x-value
increases from 0 to 240. As we move left from the origin, the
x-value changes from 0 to -240.
Tejas: Similarly, as we move up from the origin, the y-value
increases from 0 to 180. As we move down from the origin,
the y-value changes from 0 to -180.
Moz: Very good.
Moz: Let us look at an example of this in real life. Jyoti, you stay in a four
stored building. Isn’t it?
Jyoti: Yes. I stay on 4C. On each floor we have four houses. The horizontal
line x, which represents houses on each floor, has values A, B, C,
D. The vertical line y, which represents the floors, has values
1, 2, 3, 4.
Tejas: Then the address of the 3rd house in the second
floor is 2C.
4
3
2
1
A B C D
Jyoti’s House
Each point on the stage is represented by two numbers. In
Scratch, these numbers are called x and y values.
CONCEPTS
Moz: Good. Now, get back to the Scratch instructions.
Tejas: We have to move the Sprite to a particular position on the stage at
the start of the game.
Moz: In which block will you find the movement instructions?
Jyoti: Motion block.
Jyoti (points to the instruction) : Let us try out this instruction.
Jyoti: Now we have to import the second Sprite into the project.
Steps to import a new Sprite:
Tejas and Jyoti use the go to x:_ _ , y: _ _ instruction
to position the first Sprite on Stage.
Step 1: Click on the
buttons to Import a
new Sprite.
Step 2: The available
list of folders are
displayed. Select a
folder to choose a
new Sprite.
Read More