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

Programming concepts


With Scratch, we'll learn how to turn our imaginations into games, stories, and animations, and in the process, we'll learn some common programming concepts. If you're already a knowledgeable programmer, then you'll find out what Scratch has to offer your students.

The Scratch team publishes several resources to help educators, including a Programming Concepts guide, which I've summarized below:

Concept

Description

Program Design

When we design a program, we turn our imagination into something that can be shared with others. We create the flow of the program, the interface, and the actions each sprite takes to tell our story.

Loops (Iteration)

Loops iterate through a series of steps for as long as we tell the program to run the loop. We can use other programming concepts, such as conditional statements, to control the loop.

Conditional Statements

Check to see if a statement is true. For example, if 4 > 0 is a conditional statement.

Boolean Logic

Boolean logic operators include and, or, and not. If 4 > 0 and 4 > 1 is one example.

Variables

Variables store text or numbers for reuse in the program. They come in global and local types. For example, if x > 0 creates a conditional statement where x is 0, 1, 2, or anything else we define.

Arrays (Lists)

Arrays are similar to variables in that they store dynamic data. However, a list stores multiple values in the same way a grocery list stores a group of items.

Events

An action in the program prompts another part of the program to take an action. For example, when the Space bar is pressed, the sprite hides.

Synchronization and Coordination

Programming a sprite to receive a broadcast message from another sprite coordinates a cause and effect. Broadcasting a message and waiting for all the other sprites to act on the broadcast synchronizes the action.

Threads

Creating two scripts to run on the same control enables parallel execution. For example, programming four different sprites to pixelate when the flag (green in color) is clicked creates four threads.

Dynamic Interaction

Dynamic interaction provides real-time input into the Scratch program in order to manipulate the sprite in some way. For example, the position of the mouse is always known, so we can create a sprite that always follows the mouse position.

Random Numbers

Random numbers are picked from the range we specify.

Programming limitations

As of Scratch version 1.4, there are a few limitations with the language. As taken from Scratch's Programming Concepts guide, here are the concepts Scratch does not cover: functions, recursion, exception handling, file input/output, inheritance, parameter and return values, and defining classes of objects.

If that last paragraph sounds like gibberish, don't worry about it.