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.

_images/00-ide.png

The Scratch Integrated Development Environment (IDE).

Note that there are 7 major components to the IDE.

Scratch IDE Components

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.

Code Block Types

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.

_images/02-code-blocks.png

Code blocks are organized into types by color.

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.

_images/03-script-editor.png

The script editor area is where you place your code blocks.

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].

_images/04-stage.png

The stage area displays the sprites and backdrops in your program.

1.5. Program Controls

There are two buttons that you may use to start and stop your program.

  • green flag is used start your program

  • red octagon is used to stop your program

_images/05-controls.png

The controls are what you may press to start (green flag) and stop (red octagon) 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).

_images/06-sprite-control.png

The sprite control area allows you to add, remove and update your sprites.

1.7. Backdrop Control

The backdrop control area is where you may add, remove and update your backdrops.

_images/07-stage-control.png

The backdrop control area allows you to add, remove and update your backdrops.