HOW TO USE
ABOUT SCRATCH
COMPONENTS OF SCRATCH
CODE
COSTUMES
SOUNDS
TUTORIAL
about scratch:
Scratch is a free programming language and
online community where you can create your
own interactive stories, games, and
animations.
Scratch helps young people learn to think
creatively, reason systematically, and work
collaboratively — essential skills for life in the
21st century.
Scratch is designed, developed, and moderated
by the Scratch Foundation, a nonprofit
organization. It is provided free of charge.
website:
https://scratch.mit.edu/
Make your icon move to the right.
You can change the number of steps.
If you want to make it move to the left, add negative
numbers.
Make your icon rotate in the direction of
clockwise or counterclockwise.
You can change the number of degrees.
Make your icon appear at random position.
Make your icon stay at accurate position.
'x' is horizontal line and 'y' is vertical line.
For example: x: 0, y: 0 means that the icon stay
at the center.
Make your icon glide to random position.
You can change the timing to be shorter or
longer.
You can make your icon move to the exact
position by entering number of degrees to x
and y line.
Make your icon point at the exact position.
You can change the number of degrees.
Make your icon move towards mouse-
pointer.
Make your icon move along the x line.
If you want to make it move to the left, add
negative numbers.
Make your icon stay at accurate
position on x line but randomly on y line.
Make your icon move along the y line.
If you want to make it move to the bottom, add
negative numbers.
Make your icon stay at accurate
position on y line but randomly on x line.
The icon will bounce back into the
frame once it hits the edge.
You can choose the rotation style of the
icon either left-right, don't rotate or all
around.
These can be used in
any suitable elements.
The text will appear for 2 seconds
User can change the text given.
The text will appear with no time limit.
User can change the text given.
User can change the icon's costume.
For details, can refer to section 2 - Costumes
User can change the background.
User can change the icon's size.
Looks blocks are related to the
appearance of sprites and the stage.
Some of the functionalities are
changing costumes and applying
graphic effects.
The complete sound will be played even with
multiple clicks.
The uncomplete sound will be played if user
do multiple clicks.
This element can stop all added sounds.
User can change or set the pitch of the sound
to higher or lower.
Gives a clear sound effects.
User can change or set the volume of the
sound to higher or lower.
They are color-coded light yellow and
are used to sense events, which
trigger scripts to run.
Event blocks are essential for every
project: without the hat blocks from
this category, a project would not be
able to begin except by manually
running scripts.
Control blocks run the basic flow of a
project in the desired fashion, whether it
be organized or unexpected.
They provide functions for looping
various blocks and scripts. They
"control" the project and enhance its
running.
Sensing blocks associate with sprites and the
stage detecting conditions.
For example, sensing blocks can be used to
detect when one sprite touches another.
They consist of many booleans and can work
with Control blocks to stabilize a project's flow.
Operators blocks deal with many mathematical functions
within a project. They are a green color and provide the
capabilities of simple to complex mathematical operations.
"Operators" also contains blocks for modifying strings and
implementing them into various uses. There are some
boolean blocks, too, in which some are related to
mathematical outputs, while others are used for adjoining
other booleans into one or a different output condition.
Variables blocks include two
subcategories, Variables and Lists,
but both are related to storing and
accessing data.
Variables blocks are used for storing
information, such as a score in a
project, and using it in scripting and
other beneficial purposes.
Lists are another subcategory of Variables blocks.
The blocks become visible once a list is created.
My blocks are blocks that hold custom
procedures for a selected sprite.
The blocks are useful for running a script
without screen refresh and organization of
the scripts.
It is also possible to add boolean and number
and string inputs to the My Block.
User can create
new icon/animation
/character
select reshape
eraser
brush text
fill circle
line
rectangle
User can name the sound.
User can upload the sound.
The sound will be given randomly.
User can record the sound.
User can choose the sounds given.
HOW TO MAKE A CATCH GAME?
7 2
63 5
4
1
Steps on how to move the bowl:
1. Click the cat icon and choose the bowl icon.
2. Go to Control Block and choose "if...then" block.
3. Go to Sensing Block and choose "key (space) pressed?". Change (space) to (right
arrow).
4.Go to Motion Block and choose "change x by (10)" so that you can make the icon
move to the right when the right arrow key is pressed by the user.
5.Repeat 2-4 steps but change the (right arrow) to (left arrow) and put negative
numbers to make the icon move to the left.
6.Go to Control Block and click "forever" block. Combine 2-5 steps into this block.
7.Go to Events Block, choose "when (green flag) clicked" and put it at the top of the
code.
HOW TO MAKE A CATCH GAME?
6
2
3
5
4
1
Steps on how to make the apple fall down:
1. Click the cat icon and pick the apple or any suitable object.
2. Go to Motion Code and select "change y by (-5)" to make the apple go down. To make
the apple fall down continuously, put the code inside "forever" loop.
3. Go to Control Block and drag "if...then" block. To make sure the apple goes back to
the top once it hits the bottom, go to Operators Block. Pick "() < 50" block and change
the code to "y position < -170"
4. Next, go to Motion Block and choose "go to (random position)" block. Choose "set y to
()" block to set how high the apple will be. Put 180 to make the apple goes back to the
top.
5. Combine the step 2 to step 4 into "forever" loop.
6. Lastly, add the "when (green flag) clicked" code at the top.
HOW TO MAKE A CATCH GAME?
5
31
4
2
Steps on how to catch the apple:
1. Go to Control Block and choose "if...then" block. Add the "touching (mouse-
pointer)" block but change the mouse-pointer to bowl.
2. To make sure that the apple go back to the top once it touches the bowl, go to
Motion Block and choose "go to (random position)" block. Choose "set y to (-)"
block and insert 180.
3.Put the step 1 and 2 into "forever" loop.
4. If you want to play a sound once the bowl touches the apple, go to Sound Block
and choose "start sound ()". You can add any sounds.
5.Lastly, add "when (green flag) clicked" from the Events Block on top of the code.
HOW TO MAKE A CATCH GAME?
1
2
Steps on how add the score:
1. Go to Variables Block and click "make a variable". Name the new variable to
"Score". To set the score to zero when the game starts, add "set (score) to 0"
block.
2. To make the score increases everytime the player manages to catch the apple,
select "change (my variable) by 1" block. Replace (my variable) to (score) and put
it on top of the sound block.
3. Save the project and you are done.
YOU ARE DONE AND
ENJOY THE GAME!
By: Lecturer's Name:
NUR ALIA SYAFIKAH BINTI HAMDAN DR. SUHAZLAN BIN SUHAIMI
D20191087885