Preface
When we program, we solve problems. In order to solve problems, we think, take action, and reflect upon our efforts. Scratch teaches us 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, we will program games, stories, and animations using hands-on examples that get us thinking and tinkering. For each project, we start with a series of steps to build something. Then, we pause to put our actions into context so that we 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.
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.
What this book covers
Chapter 1 provides an overview of Scratch, its features, and how it can help you teach 21st century learning skills to your children and students.
Chapter 2 guides us through the installation of Scratch on Windows, OS X, and Linux. This chapter also helps you run the Scratch programming environment from a USB flash drive.
Chapter 3 explores the Scratch interface and allows us to create some simple scripts that demonstrate how easily we can build a project. This is a high-speed tour of Scratch that gets us tinkering and thinking about what's possible.
Chapter 4 teaches us how to create an animated birthday card and a slideshow of our favorite photos.
Chapter 5 allows us to horse around as we develop a barnyard humor book that lets us narrate multiple scenes. There's no need to hold the applause.
Chapter 6 takes a classic pong game and gives it a little personality by adding a troll, switching levels, and keeping score.
Chapter 7 takes us to the fortune-teller, but before we learn the random answers to all our deepest questions, we must create our game using the Magic 8 ball's fortunes.
Chapter 8 uses mathematical formulas and graphs to help us answer the question, "Would you rather have a dollar that doubles every day or a lump sum of money?" The answer may surprise you.
Chapter 9 explains how to share your project with the Scratch community and how to promote it to you friends and fans.
Chapter 10shows us how to connect a webcam and an external sensor board to our computer and delivers real-world stimuli as input to Scratch projects.
What you need for this book
All you need is an imagination and a willingness to experiment. You will also need a computer with Scratch 1.4 installed. Most modern computers should easily run the latest version of Scratch; however, the Scratch team makes Scratch 1.2.1 available on the Scratch Download page for older systems. Here are the system requirements as defined by the Scratch team:
Display: 1024 x 768
16-bit color or higher
Disk Space: At least 120 MB
Operating Systems:
Windows 2000 or higher for Scratch 1.3
Windows 98 users can use Scratch 1.2.1
Mac OS X 10.4 for Scratch 1.3
Mac OS X 10.3 for Scratch 1.2.1
Linux support via WINE
Native Linux support is experimental
If you want to take advantage of Scratch's audio and recording features, you will need a sound card, speakers, and a microphone.
Who this book is for
Scratch is a teaching language, so it's ideal for people who want to learn how to program or teach others how to program. Educators and parents will learn how to program using Scratch, and they can use Scratch to teach 21st century learning skills to their students and children.
The 21st century learning skills help develop digital literacy by teaching children how to design, think critically, collaborate, communicate, and program in a computer language.
No previous computer programming knowledge is required. If you know how to send email, create documents, or create presentations, then you have the prerequisite skills to learn how to program in Scratch.
For beginning programmers, this book will teach the basic concepts that you can then utilize to learn more advanced languages, such as Ruby, PHP, and Python.
Parents, are you stuck with a child who wants to play video games all night? Make a new rule. Your child can play a video game only if he or she programs the game first.
Conventions
In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, along with an explanation of their meaning:
Code words in text are shown as follows: "We can include other contexts through the use of the include
directive."
New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in our text like this: "Clicking the Next button moves you to the next screen."
Note
Warnings or important notes appear in a box like this.
Tip
Tips and tricks appear like this.
Reader feedback
Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us to develop titles that you really get the most out of.
To send us general feedback, simply drop an email to <feedback@packtpub.com>
, and mention the book title in the subject of your message.
If there is a book that you need and would like to see us publish, please send us a note in the SUGGEST A TITLE form on www.packtpub.com or email <suggest@packtpub.com>
.
If there is a topic in which you have expertise and you are interested in either writing or contributing to a book, please see our author guide on www.packtpub.com/authors.
Customer support
Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.
Downloading the example code for the book
Visit http://www.packtpub.com/files/code/6767_Code.zip to directly download the example code.
The downloadable files contain instructions on how to use them.
Errata
Although we have taken every care to ensure the accuracy of our contents, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in text or code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration, and help us to improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/support, selecting your book, clicking on the let us know link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata added to any list of existing errata. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.
Piracy
Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or web site name immediately so that we can pursue a remedy.
Please contact us at <copyright@packtpub.com>
with a link to the suspected pirated material.
We appreciate your help in protecting our authors and our ability to bring you valuable content.
Questions
You can contact us at <questions@packtpub.com>
if you are having a problem with any aspect of the book, and we will do our best to address it.