Session 6
Recall test
What is the X and Y axis ?
The horizontal line is called the x-axis and the vertical line is called the
y-axis.
Which command takes the sprite to the center of the stage ?
What is the use of the wait () command ?
This command creates a pause whenever needed.
How many quadrants are there in the stage ?
The two axes divide the Stage into four quadrants.
What are X and Y coordinates on the stage ?
Each point on the stage is represented by x coordinate and y coordinate.
What is the difference between goto x() y() and glide() x() y()
command ?
The glide command, “glide _ secs to x: _ y: _”, specifies a duration for how long it
will take the sprite to move to the stated point.
The go to command, “go to x: _ y: _”, instantly moves the sprite to the specified
point
Topic for the session
How to move the sprite in all directions on the stage
Change X and Change Y Command:
Ø Change x by 10 command makes the sprite to move right side by 10 steps
Ø Change x by -10 command makes the sprite to move left side by 10 steps
Ø Change y by 10 command makes the sprite to move up by 10 steps
Ø Change y by -10 command makes the sprite move down by 10 steps.
Set X() and Set Y() Command
Ø Set x value command will make the sprite to go and stay in that specific x
value
Ø Set y value command will make the sprite go and stay in that specific y
value.
Point in Direction Command
A sprite's default direction value is 90, which actually represents no rotation.
Negative degree measures simply mean rotation counterclockwise rather than
clockwise. So, -90 is left and -180 is down
Point in direction and move command makes the sprite to move in that specified
direction
Concept test
Which command moves the sprite upwards ?
Which command moves the sprite left ?
What is the point in direction (0) command ?
The sprite will face upwards.
The sprite will face downwards.
Which command moves the sprite downwards ?
What is the difference between change x by() and set x() command ?
Do you want to set the variable or change it?
The set command sets the sprite in the specified value whereas the change
command changes the location of the sprite from one to another with the
specified value.
What is a 360 degree angle ?
We can measure Angles in Degrees.
There are 360 degrees in one Full Rotation (one complete circle around).
Class Activity 1 :Edward’s first favourite game is bouncing balls.Can we
help edward in creating the game ?
-Add background for the game.
-Add ball sprite.
-Add code to make the balls bounce.
Class Activity 2 :Edward’s second favourite game is Jumping
Jellyfish.Let’s help Edward in creating jumping jelly fish game.
-Add background of underwater theme.
-Add Jellyfish sprite.
-Add code to make jellyfish jump.
Class Activity 3 :Since childhood Edward was fascinated by the space
world.In game zone as well daniel loved space game.Let’s help edward in
creating space game.
-Add background of space theme.
-Add astronaut and rocket sprite.
-Add code to make the astronaut sprite glide on random position and rocket
sprite to move from right to left/left to right starting with specific position.
Commands for ripley sprite
Commands for rocket sprite
Class Activity-4:Edwardl loved Flying Game in the game zone.So Edward
decided to create a flying cat in scratch.
-Add background.
-Add cat,cloud and building sprite.
-Add code for building and cloud sprite to give the illusion of a flying cat.
Code for Building Sprite:
Code for Cloud Sprite:
Home Assignment
1) Create a complete animated fish tank project in which fish sprites
should swim continuously and jellyfish should jump continuously.
2) Create a complete animated flying scene in which bird and the cloud
sprites move continuously.