1. Integrated Development Environment
The Scratch
Integrated Development Environment (IDE) is a complete, self-contained program used to code games, control drones and program behavior into robots. Out of the box, Scratch is typically used to teach students how to code games. However, do not underestimate Scratch, as it is a versatile IDE that many others build upon to code and program other things. When you start Scratch, the IDE should look like the following.
Note that there are 7 major components to the IDE.
Component |
Purpose |
|
---|---|---|
1 |
Menu |
Load and save files. |
2 |
Code Blocks |
Reusable code blocks to control and add behavior to your program. |
3 |
Script Editor |
Area to build your code logic. |
4 |
Stage |
Area that shows your program in execution. |
5 |
Program Control |
Controls to start and stop your program. |
6 |
Sprite Control |
Area to add, update, remove and define your sprites. |
7 |
Backdrop Control |
Area to add, update, remove and define backgrounds. |
We breakdown these major components of the Scratch IDE and discuss each below.
1.2. Code blocks
In Scratch, code is organized visually into types known as code blocks
. There are 9 types of code blocks. Here, we only show where the code block is located in the IDE; later, we will go into depth about each of the different types of code blocks.
Type |
Color |
Purpose |
---|---|---|
Motion |
Blue |
Move things. |
Looks |
Purple |
Change the look of things. |
Sound |
Magenta |
Manipulate sounds. |
Events |
Yellow |
Listen for events. |
Control |
Orange |
Control your program. |
Sensing |
Light Blue |
Sense the surrounding. |
Operators |
Green |
Math and comparison operations. |
Variables |
Dark Orange |
Create and retrieve variables. |
My Blocks |
Red |
Create custom blocks. |
1.3. Script editor
The script editor area is where you drag and drop code blocks into to create your programs. When you start up Scratch, the script editor will be empty (or blank). Do not let this empty space fool you, as when you start to master Scratch, you will quickly have this area filled with code.
1.4. Stage
The stage area is where you may observe your code in action as well as the associated sprites, sounds and backdrops. Note that the stage has a x-y coordinate
system in place where (0, 0)
is the center. The domain of the x-axis
is [-240, 240]
and for the y-axis
is [-180, 180]
.
1.5. Program Controls
There are two buttons that you may use to start and stop your program.
green flag
is used start your programred octagon
is used to stop your program
1.6. Sprite Control
The sprite control area is where you may add, remove and update your sprites. When you highlight a particular sprite in this area, note that the current state of the sprite is also shown (such as the x and y position).
1.7. Backdrop Control
The backdrop control area is where you may add, remove and update your backdrops.