CPT2071 - Material - K00958 - 20201104142833 - Introduction To Scratch
CPT2071 - Material - K00958 - 20201104142833 - Introduction To Scratch
SCRATCH!
Dr Suhazlan Suhaimi
WHAT IS SCRATCH?
• Scratch is a free programmable toolkit that enables kids
to create their own games, animated stories, and
interactive art
• and share their creations with one another over the
Internet.
WHAT IS SCRATCH?
• Scratch builds on the long tradition of Logo and
LEGO/Logo, but takes advantage of new
computational ideas and capabilities to make it easier
for kids to get started with programming (lowering the
floor) and to extend the range of what kids can create
and learn (raising the ceiling).
WHAT IS SCRATCH?
• The ultimate goal is to help kids become fluent with
digital media, empowering them to express themselves
creatively and make connections to powerful ideas.
WHAT IS SCRATCH?
• Scratch is built on top of the Squeak environment
developed by Alan Kay and colleagues.
WHAT IS SCRATCH?
• Scratch is being developed by the Lifelong
Kindergarten research group at the MIT Media Lab, in
collaboration with KIDS research group at the UCLA
Graduate School of Education & Information Studies.
LET’S GET STARTED!
• To Open Scratch, double-click on the Scratch (cat)
icon or click on Scratch.exe
GETTING STARTED WITH
SCRATCH
Once you’ve opened Scratch, you should see this
default screen:
WATCH A QUICK
INTRODUCTION TO
SCRATCH!
LET’S LOOK AT SOME
SCRATCH EXAMPLES
• To choose a sprite
from the Scratch
library, click on the
Folder with a Star
icon. When you
hover your mouse
over it, it will say
“Choose new
sprite from file”.
CHOOSE YOUR SPRITE!
Open the folders of the
different categories of
sprites. Choose one
that you’d like to
experiment with by
double clicking on it.
You can have more
than one sprite in your
animation!
CHOOSE YOUR SPRITE!
• Once you have a sprite that
you’d like to program, you
can delete the orange cat
sprite by clicking the scissor
icon and clicking on the cat!
• Make sure that you click on
the arrow icon before you do
anything else – otherwise,
you’ll delete something that
you really wanted!
• You can also right click on
the icon to delete that sprite
RESIZE YOUR SPRITE!
• You can make your sprite larger or smaller
by using the “grow sprite” or “shrink sprite”
icons.
• You click on one of these icons, then click
on your sprite until it is the size you’d like.
CHOOSE YOUR
BACKGROUND!
• Right now, you have a plain, white
background – boring!
• You can also change your background by
choosing one from the Scratch library or
creating your own!
CHOOSE YOUR
BACKGROUND!
• Click on the Stage:
-240 240
-180
MORE MOTION!
• Now, add the “turn 15 degrees” block to
the other block of code.
• When you see the white bar between the 2
blocks of code, you can release your
mouse. That white bar means that the 2
blocks will “snap” onto the other block.
MORE MOTION!
• Again, you can change the number of
degrees by double clicking in that area
and typing in the number of degrees you’d
like your sprite to rotate.
• Double click on the blocks to see your
sprite move and rotate!
EXPERIMENT WITH MOTION!
• We’ve only used 2 of the blocks in the
Motion category.
• For the next few minutes, I want you to
experiment with all of the other blocks in
the Motion category.
• If you’d like to see what a block does,
right click on the block and then click on
help.
• You can delete code easily by just
dragging it from the Script area!
• Have fun!
CONTROL!
• The next category of programming buttons
we will experiment with is the Control
category.
• This is a very important category because it
controls how many times an event
happens, how long an event happens, or
when an event happens.
CONTROL!
• The first block I’d like us to use is the “when
flag clicked” block:
This code means that if the user presses the Space key on the
keyboard, the sprite will move 10 steps.
SENSING!
• The conditional statements must be used
along with the sensing blocks. (Notice the
shape of some of the sensing blocks. They
are the ones that will fit inside the
“condition” since they have 6 sides)
BACK TO CONTROL!
• For the next few minutes, experiment with
the blocks in Motion, Control, and Sensing.
• Right click on a block and select help to
get information about a block.
• When you get something cool, I’d like to
see it!
SOUND!
Adventures in Animation
ADDING SOUND
• Now, select one of the blocks that says,
“play sound…”