Book Image

Scratch 1.4: Beginner's Guide

Book Image

Scratch 1.4: Beginner's Guide

Overview of this book

If you have the imaginative power to design complex multimedia projects but can't adapt to programming languages, then Scratch 1.4: Beginner's Guide is the book for you. Imagine how good you'll feel when you drag-and-drop your way to interactive games, stories, graphic artwork, computer animations, and much more using Scratch even if you have never programmed before. This book provides teachers, parents, and new programmers with a guided tour of Scratch's features by creating projects that can be shared, remixed, and improved upon in your own lesson plans. Soon you will be creating games, stories, and animations by snapping blocks of "code" together. When you program you solve problems. In order to solve problems, you think, take action, and reflect upon your efforts. Scratch teaches you to program using a fun, accessible environment that's as easy as dragging and dropping blocks from one part of the screen to another. In this book you will program games, stories, and animations using hands-on examples that get you thinking and tinkering. For each project, you start with a series of steps to build something. Then you pause to put our actions into context so that you can relate our code to the actions on Scratch's stage. Throughout each chapter, you'll encounter challenges that encourage you to experiment and learn. One of the things you're really going to love is that, as you begin working through the examples in the book, you won't be able to stop your imagination and the ideas will stream as fast as you can think of them. Write them down. You'll quickly realize there are a lot of young minds in your home, classroom, or community group that could benefit from Scratch's friendly face. Teach them, please.
Table of Contents (17 chapters)
Scratch 1.4 Beginner's Guide
Credits
About the Author
About the Reviewer
Preface
Scratch Resources
Index

Scratch anatomy


For those of us with a desire to use geek terms, Scratch provides an Integrated Development Environment (IDE) that enables us to design, program, and run our projects. Don't worry; we'll just call it the Scratch interface from this point forward. You can see it in the following screenshot:

In the following chapters, we will become familiar with the parts of the Scratch interface, so we don't need to spend a lot of time reviewing what each button does. Let's instead stick with the big concepts.

Building blocks

If we review the Scratch interface from left to right, everything we need to create a project is readily accessible. To the left side of the interface, we have categories of blocks that are grouped by the kinds of tasks they perform. They are Motion, Looks, Sound, Pen, Control, Sensing, Operators, and Variables.

Throughout the book, I'll refer to these categories of blocks as palettes.

The palette of blocks available to us as Scratch programmers are analogous to the palette of colors an artist mixes when creating a painting. Each type of block is color-coded so that we can easily identify them in our scripts.

Write the script

When we create our Scratch programs, we build a group of scripts that tell our story. Instead of using words as you're used to reading them on this page, we'll build our scripts from the palette of blocks.

We'll drag, drop, and snap them into place in the Scripts area to create our story. The following screenshot shows a script that was taken from one of the sample projects included with Scratch:

If we read the blocks shown in the screenshot from top to bottom, we should have a good idea of the story this sprite tells. Who doesn't love a knock-knock joke?

To see our story play out, we watch the stage.

Watch the story

When it comes time to review the script, we watch it on the stage. It's here that we get to see our ideas turn into reality.

And just like the stage at the theater, we can see from our screenshot that we can have a cast of characters to entertain us.

Scratch even provides a built-in image editor to help us create and modify our characters, which we call sprites.

Built-in image editor

Scratch includes a simple image editing environment called the Paint Editor that allows us to apply text, color, and shape to our sprites and backgrounds.

The Paint Editor allows us to do the following:

  • Create shapes and text

  • Import and edit images

  • Apply color treatments

  • Resize, rotate, and flip an image

The Paint Editor is available from multiple points within the Scratch interface, as we'll see later in the book.

Interface promotes tinkering

The structure of the Scratch interface makes it easy for us to tinker and explore ideas. As we create, we evaluate our work and determine if the results meet our expectations. It's very easy because everything happens in one interface.

We don't have to compile code, switch windows, upload files to a server, or encounter any number of obstacles to see if our code works. Scratch enables us to modify the program as it runs and see the results in real time.