Introduction To Scratch BRIGHTCHAMPS
Introduction To Scratch BRIGHTCHAMPS
In this section, we will introduce you to Scratch, a programming language developed at the MIT
Media Lab in the United States that has captured the imagination of children everywhere.
Scratch makes it easy for users to create their own interactive stories, animations, games,
music, art and to share these creations on the web.
What is a program?
A program is a set of instructions that tells a computer or other electronic device what to do.
These instructions or commands are written in an artificial (i.e. nonspeaking) language. The
script used is often referred to as code or computer code. Computer programming or coding is
the process of writing code.
In the project editor, in the top-right corner adjacent the project page button is a "Share" button(as in
image below) which appears for an unshared project. Clicking this will share the project.
When a project is shared, it becomes publicly viewable to all Scratchers, even if not signed in. Once a
project is shared, it becomes possible for anyone to remix the project.
Sprite - Sprite is nothing but a character/object of an animation or a game. It can be a girl ,boy, fruit,
ball, etc.
Stage - This is where you happen to see all the action based on the instructions we give the sprite.
This will help you to observe if you are developing the game in the right direction or if any of the
instructions given are not correct.
Blocks - These are the instructions given to the sprite. As you can see, these instructions are in
english like ‘Move 10 steps’, ‘Go to random position’ etc.., However, the blocks consist of the computer
language to translate the English into the required instruction to develop the game
Scripting/code area - This is where you need to provide all the instructions to develop the
game.
Adding sprite and backdrop on stage:-
Choose a backdrop from the library, or if you want to, you can create your own.
Similarly choose a sprite from the library, or if you want to, you can create your own.
More about stage
The Stage is the term for the background of the project. A stage has some restrictions as compared
to sprites. Features of stage:
A Stage is stationary, thus,
Cannot use Motion Blocks
Cannot use any Pen functions, other than Clear
Has no size blocks
Has no “touching” blocks in the Sensing category
Has no “distance to” block in the Sensing category
Cannot talk, thus,
Has no “Say” or “Think” blocks in the Looks category
When asking, places the question above the text box rather than in a
speech bubble.
Has backdrops instead of costumes
Cannot be renamed
Has no “show” or “hide” blocks in the Looks category
Cannot change layers — it is always at the very back layer.
Must have a 480×360 dimension
Space in backgrounds left transparent becomes white automatically
Stage in Scratch has a 2D coordinate system which uses 2 coordinates, “X position” and “Y
position”, to determine the location of a sprite on the stage. The “X position” value
determines the horizontal location of the sprite and the “Y position” value determines the
vertical location or height. The screen is a 480×360 rectangle, such that: the X position can
range from 240 to -240, where 240 is the rightmost a sprite can be and -240 is the leftmost,
and the Yposition can range from 180 to -180, where 180 is the highest it can be and -180 is
the lowest it can be. The coordinate system is shown in the figure given below.
Hat blocks
Hat blocks are the blocks that start every script. They are shaped with a rounded top and a bump at
the bottom — this is so you can only place blocks below them. There are 11 Hat blocks in the Scratch
editor, six of which are in the Events category, one in the Control category, and one in the
category My Blocks (if one has created one custom block).
Stack blocks
Stack blocks are the blocks that perform the main commands. They are shaped with a notch at the
top and a bump on the bottom — this is so blocks can be placed above and below them. There are
77 Stack blocks — the most common block shape.
Boolean blocks
The shape of a Boolean block.
Boolean blocks are the conditions — they are either true or false. For example, asking a computer:
"Does 2 + 2 = 4?", and it would either tell you "True" or "False". With a hexagonal shape, there are 13
of these blocks.
Reporter blocks
Reporter blocks are the values. Reporter blocks can hold numbers and strings. It is like asking a
friend, for example, "What is 2 + 2?", and they would answer "4". It can also report a variable. For
example, "What is your age?" and they may answer: "15". Shaped with rounded edges, there are 37
of these blocks — not counting the theoretically infinite amount of Reporter blocks that can be made
for each variable and list.
C blocks
C blocks are blocks that take the shape of "C's". Also known as "Wrap blocks", these blocks loop the
blocks within the Cs or check if a condition is true. There are five C blocks, and they can be found in
the Control category. C blocks can be bumped at the bottom, or capped.
Cap blocks
Cap blocks are the blocks that end scripts. They are shaped with a notch at the top and a flat bottom
— this is so you cannot place any blocks below them. There are two Cap blocks which can both be
found in the Control category.
List of blocks:-
There are 119 blocks in Scratch 3.0 (not including extensions ):
Motion blocks
Motion blocks are the blocks that control a Sprite's movement. There are 17 Motion blocks in Scratch
3.0.
Scratch 3.0 has the following three Motion Reporter blocks:
Looks blocks
Looks blocks are the blocks that control how a sprite looks. There are 23 Looks blocks in Scratch
3.0. Three of the 19 sprite Looks blocks have a counterpart for the Stage.
Scratch 3.0 has the following eighteen Looks Stack blocks:
Sound blocks
Sound blocks are the blocks that control sound. There are 16 Sound blocks in Scratch 3.0. The note
blocks in 3.0 have been moved to the Music Extension.
Scratch 3.0 has the following eight Sound Stack blocks:
Events blocks
Events blocks are blocks that control events and the triggering of scripts. There are 8 Event blocks
in Scratch 3.0.
Scratch 3.0 has the following six Event Hat Blocks:
Control blocks
Control blocks are the blocks that control scripts. There are 11 Control blocks in Scratch 3.0.
Scratch 3.0 has the following one Control Hat block:
Sensing blocks
Sensing blocks are the blocks that detect things. There are 21 Sensing blocks in Scratch 3.0.
Scratch 3.0 has the following three Sensing Stack blocks:
Operators blocks
Operators blocks are the blocks that perform math functions and string handling. There are 18
Operators blocks in Scratch 3.0.
Scratch 3.0 has the following seven Operators Boolean blocks:
Variables blocks
Variables blocks are the blocks that hold variables and lists. There are 5 Variables blocks and 11 list
blocks in Scratch 3.0.
Scratch 3.0 has the following four Variables Stack blocks:
List blocks are the blocks that manage lists. They are located in the Variables category and are not
found in the bar to the left. There are 11 List blocks in Scratch 3.0.
Scratch 3.0 has the following six List Stack blocks:
My Blocks
My Blocks are user-made custom blocks. There are 4 unique kinds of My Blocks in Scratch 3.0.
Scratch 3.0 has the following My Blocks Hat block:
Other than all these categories of blocks there are extensions also.