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

Troll pong


Let's flash back to 1972 and create a clone of the popular Atari video game Pong. Instead of starting this program from scratch, we're going to start with a sample project that we can use as a basis for our creativity.

Time for action – open the sample pong project

Open the sample pong game that's included with Scratch:

  1. In Scratch, click the File | Open menu to display the Open Project dialog box.

  2. Click on the Examples button. Then open the Games folder and select Pong. Click OK to load the project.

  3. Play the game by clicking on the flag. Move the mouse left or right to control the paddle and hit the ball.

  4. Move the mouse up and down the stage. The paddle doesn't move.

  5. When you've had enough, stop the game.

  6. Let's get some more information about what the ball is doing. From the Motion palette, click on the checkbox next to direction. This displays a new report block on the stage that shows the ball's direction.

  7. Play the game again and note how the ball direction value changes as the ball...