Available:*
Library | Item Barcode | Call Number | Material Type | Item Category 1 | Status |
---|---|---|---|---|---|
Searching... | 30000010329043 | QA76.165 F67 2014 | Open Access Book | Book | Searching... |
On Order
Summary
Summary
With Scratch 2.0, getting started in computer programming is easier and more fun than ever. And with this completely updated edition of the popular Scratch Programming for Teens, you'll learn the basics in a fast, friendly way and be sharing your creations online before you know it. Focused on the fundamentals and using the free Scratch programming language, Scratch 2.0 Programming for Teens will teach you to develop interactive stories, games, animations, and other programs on the web, in your computer's browser, using graphic, customizable code blocks. Written especially for first-time programmers, this book's hands-on approach emphasizes the design and development of programming logic. You'll learn important programming concepts without getting bogged down in complicated details. And the basic principles you learn here will build a foundation from which you can move on to other, more complex, programming languages (like Microsoft Visual Basic, Java, and C++), if you decide to go deeper into software development. Additional material, including helpful appendixes and a complete glossary, is available on this book's companion website. Start programming today with Scratch 2.0 Programming for Teens. Scratch is a project of the Lifelong Kindergarten group at the MIT Media Lab. Scratch, the Scratch logo, and the Scratch Cat are trademarks of the Massachusetts Institute of Technology.
Author Notes
Jerry Lee Ford, Jr. is an author, educator, and IT professional with more than 24 years of experience in information technology, including roles as an automation analyst, technical manager, technical support analyst, automation engineer, and security analyst. He is the author of 37 books and coauthor of two more. Ford has a master's degree in business administration from Virginia Commonwealth University in Richmond, Virginia, and has worked as an adjunct instructor teaching networking courses in information technology.
Table of Contents
Introduction | p. xi |
Chapter 1 Introducing Scratch 2.0 | p. 1 |
Getting to Know Scratch 2.0 | p. 1 |
Imagine-Program-Share! | p. 2 |
Scratch Uncovered | p. 3 |
Scratch 2.0's Building Block Approach to Programming | p. 4 |
Getting Ready for Scratch 2.0 | p. 6 |
Creating Your First Scratch 2.0 Application | p. 8 |
Creating a New Scratch 2.0 Project | p. 9 |
Changing Sprite Attributes | p. 11 |
Adding Code Blocks | p. 12 |
Saving Your Work | p. 16 |
Joining Scratch 2.0's Global Community | p. 17 |
Sharing Your Application Projects | p. 17 |
Registering with the Scratch 2.0 Website | p. 19 |
Changing Your Scratcher Status | p. 21 |
Keeping in Touch | p. 22 |
Chapter 2 Getting Comfortable with the Scratch 2.0 Development Environment | p. 25 |
Getting Comfortable with the Scratch 2.0 Project Editor | p. 26 |
Getting Familiar with Menu Bar Commands | p. 27 |
Running Scratch 2.0 Applications on the Stage | p. 28 |
Running Applications in Full-Screen Mode | p. 30 |
Controlling Application Execution | p. 31 |
Working with the Sprite List | p. 31 |
Generating New Sprites | p. 34 |
Tracking Mouse Pointer Location | p. 36 |
Switching Between Code Block Groups | p. 36 |
Getting Comfortable with the Scripts Area | p. 37 |
Backpack | p. 44 |
Adding Project Instructions, Notes, and Credits | p. 45 |
Creating New Sprites Using Scratch's Paint Editor | p. 47 |
Examining the Drawing Canvas | p. 49 |
Working with Editor Tools | p. 50 |
Working with Button Controls | p. 53 |
Specifying Color Settings | p. 54 |
Configuring a Sprite's Rotation Center | p. 54 |
Chapter 3 A Review of the Basic Components of Scratch Projects | p. 57 |
Working with Blocks and Stacks | p. 57 |
Arguments | p. 59 |
Default Values | p. 60 |
Six Basic Types of Scratch Blocks | p. 61 |
Working with Stack Blocks | p. 61 |
Working with Hat Blocks | p. 62 |
Working with Reporter Blocks | p. 63 |
Working with Boolean Blocks | p. 64 |
C Blocks | p. 65 |
Cap Blocks | p. 65 |
Keeping an Eye Out with Monitors | p. 66 |
Ten Categories of Scratch Blocks | p. 68 |
Moving Objects Around the Drawing Canvas | p. 69 |
Changing Object Appearance | p. 70 |
Making Some Noise | p. 72 |
Drawing Lines and Shapes | p. 74 |
Storing and Retrieving Data | p. 75 |
Event-Driven Programming | p. 77 |
Implementing Looping and Conditional Logic | p. 78 |
Sensing Sprite Location and Environmental Input | p. 79 |
Working with Operators | p. 81 |
Custom and Specialized Blocks | p. 83 |
Getting Help with Code Blocks | p. 85 |
Chapter 4 Mr. Wiggly's Dance-A Quick Scratch Project | p. 87 |
Programming with Scratch | p. 87 |
Creating the Mr. Wiggly's Dance Application | p. 89 |
Step 1 Creating a New Scratch Project | p. 91 |
Step 2 Adding a Backdrop to the Stage | p. 92 |
Step 3 Adding and Removing Sprites | p. 96 |
Step 4 Adding Mr. Wiggly's Music | p. 99 |
Step 5 Playing the Dance Music | p. 102 |
Step 6 Making Mr. Wiggly Dance | p. 105 |
Step 7 Testing the Execution of Your New Project | p. 108 |
Chapter 5 Moving Things Around | p. 109 |
Working with Motion Code Blocks | p. 109 |
Moving and Rotating Sprites | p. 110 |
Setting Sprite Direction | p. 113 |
Repositioning a Sprite | p. 115 |
Changing Sprite Coordinates | p. 117 |
Bouncing Sprites Around the Stage and Controlling Rotation Style | p. 118 |
Keeping Track of Sprite Coordinates and Direction | p. 120 |
Taking Advantage of Scratch Cards | p. 121 |
Creating the Virtual Scratch Fish Tank | p. 124 |
Step 1 Creating a New Scratch Project | p. 125 |
Step 2 Adding a Backdrop to the Stage | p. 125 |
Step 3 Adding and Removing Sprites | p. 125 |
Step 4 Adding a Suitable Audio File to the Stage | p. 126 |
Step 5 Playing the Audio File | p. 127 |
Step 6 Animating the Swimming of the Fish | p. 127 |
Step 7 Executing Your New Scratch Application | p. 130 |
Chapter 6 Sensing Sprite Position and Controlling Environmental Settings | p. 131 |
Working with Sensing Code Blocks | p. 132 |
Detecting Sprite Collisions and Distance from Objects | p. 133 |
Prompting For and Collecting User Input | p. 138 |
Retrieving Keyboard Input, Mouse Button, and Coordinate Status | p. 139 |
Retrieving Audio Data | p. 143 |
Collecting and Processing Video Input | p. 144 |
Working with a Timer | p. 147 |
Retrieving Stage and Sprite Data | p. 148 |
Retrieving the Date, Time Data, and User's Name | p. 149 |
Creating the Family Scrapbook Application | p. 150 |
Step 1 Creating a New Scratch 2.0 Project | p. 152 |
Step 2 Adding and Removing Sprites and Costumes | p. 152 |
Step 3 Adding a Suitable Audio File to the Stage | p. 154 |
Step 4 Playing the Audio File | p. 154 |
Step 5 Adding the Programming Logic Required to Manage the Display of Photographs | p. 155 |
Step 6 Saving and Executing Your New Scratch 2.0 Application | p. 156 |
Chapter 7 Storing and Retrieving Data | p. 159 |
Learning How to Work with Application Data | p. 159 |
Storing Data in Variables | p. 161 |
Creating Scratch 2.0 Variables | p. 161 |
Assigning Variables to Sprites and the Stage | p. 163 |
Assigning Names to Your Variables | p. 163 |
Understanding Variable Scope | p. 163 |
Deleting Variables When They Are No Longer Needed | p. 166 |
Accessing Variables Belonging to Other Sprites | p. 167 |
A Quick Example | p. 168 |
Storing Collections of Data in Lists | p. 170 |
Developing the Basketball Quiz Project | p. 175 |
Step 1 Creating a New Scratch 2.0 Project | p. 177 |
Step 2 Selecting an Appropriate Stage Backdrop | p. 177 |
Step 3 Adding and Removing Sprites | p. 177 |
Step 4 Adding Variables That the Application Requires | p. 179 |
Step 5 Adding Scripts to Button Sprites to Collect User Input | p. 180 |
Step 6 Automating the Administration of the Quiz | p. 182 |
Step 7 Testing Your New Application | p. 185 |
Chapter 8 Doing a Little Math | p. 187 |
Addition, Subtraction, Multiplication, and Division | p. 187 |
Understanding the Mathematical Order of Precedence | p. 189 |
Generating a Random Number | p. 190 |
Comparison Operations | p. 191 |
Performing Logical Comparisons | p. 195 |
Manipulating Strings | p. 197 |
Rounding Numbers and Retrieving Remainders | p. 199 |
Working with Built-In Mathematical Functions | p. 200 |
Developing the Number Guessing Game Quiz Project | p. 201 |
Step 1 Creating a New Scratch 2.0 Project | p. 203 |
Step 2 Adding a Stage Backdrop | p. 204 |
Step 3 Adding and Removing Sprites | p. 204 |
Step 4 Adding Variables That the Application Requires | p. 205 |
Step 5 Adding an Audio File to the Application | p. 206 |
Step 6 Adding Scripts to Capture Player Input | p. 206 |
Step 7 Processing Player Guesses | p. 207 |
Step 8 Saving and Executing Your New Scratch 2.0 Application | p. 209 |
Chapter 9 Controlling Script Execution | p. 211 |
Introducing Scratch Events and Control Blocks | p. 211 |
Event Programming | p. 212 |
Initiating Script Execution | p. 212 |
Sending and Receiving Broadcasts | p. 214 |
Controlling Script Execution | p. 216 |
Pausing Script Execution | p. 216 |
Executing Loops | p. 218 |
Conditional Programming Logic | p. 220 |
Nesting Conditional Control Code Blocks | p. 223 |
Preventing Endless Loops | p. 223 |
Terminating Script Execution | p. 224 |
Cloning Sprites | p. 226 |
Developing the Ball Chase Game | p. 228 |
Step 1 Creating a New Scratch Project | p. 230 |
Step 2 Adding and Removing Sprites | p. 231 |
Step 3 Adding Variables That the Application Needs | p. 232 |
Step 4 Adding an Audio File to the Application | p. 233 |
Step 5 Adding a Script to Control Ball Movement | p. 233 |
Step 6 Adding Scripts That Display Game Over Messages | p. 233 |
Step 7 Adding Scripts Needed to Control and Coordinate Game Play | p. 234 |
Step 8 Saving and Executing Your Scratch Project | p. 237 |
Chapter 10 Changing the Way Sprites Look and Behave | p. 239 |
Looks Blocks That Affect Sprites Versus the Stage | p. 240 |
Making Sprites Talk and Think | p. 241 |
Making Sprites Appear and Disappear | p. 242 |
Changing Sprite Costumes and Stage Backdrops | p. 243 |
Changing Sprite Costumes | p. 243 |
Changing a Stage's Backdrop | p. 246 |
Applying Special Effects to Costumes and Backdrops | p. 247 |
Changing a Sprite's Size | p. 249 |
Determining What Happens When Two Sprites Overlap | p. 250 |
Retrieving Costume and Backdrop Data | p. 252 |
Developing the Crazy Eight Ball Game | p. 252 |
Step 1 Creating a New Scratch 2.0 Project | p. 254 |
Step 2 Adding and Removing Sprites- | p. 255 |
Step 3 Adding a Variable Required by the Application | p. 256 |
Step 4 Adding an Audio File to the Application | p. 257 |
Step 5 Creating a Script to Control the Display of the 8 in the Eight Ball | p. 257 |
Step 6 Adding the Programming Logic Needed to Control the Eight Ball | p. 257 |
Step 7 Saving and Executing Your Scratch 2.0 Project | p. 259 |
Chapter 11 Spicing Things Up with Sounds | p. 261 |
Playing Sounds | p. 261 |
Play a Drum | p. 263 |
Playing Musical Notes | p. 265 |
Configuring Audio Volume | p. 268 |
Setting and Changing Tempo | p. 269 |
Creating the Family Picture Movie | p. 271 |
Step 1 Creating a New Scratch 2.0 Project | p. 273 |
Step 2 Adding and Removing Sprites and Backdrops | p. 273 |
Step 3 Adding a Variable That the Application Requires | p. 276 |
Step 4 Adding a Sound to the Application | p. 277 |
Step 5 Developing the Application's Programming Logic | p. 277 |
Step 6 Naming and Testing Your Scratch 2.0 Project | p. 282 |
Chapter 12 Drawing Lines and Shapes | p. 283 |
Clearing the Stage Area | p. 283 |
Stamping an Instance of a Costume on the Stage | p. 284 |
Drawing with the Pen | p. 286 |
Setting Pen Color | p. 287 |
Changing Pen Shade | p. 291 |
Working with Different Size Pens | p. 293 |
Creating the Doodle Drawing Application | p. 296 |
Step 1 Creating a New Scratch 2.0 Project | p. 297 |
Step 2 Adding and Removing Sprites | p. 298 |
Step 3 Creating Scripts to Control the Doodle Drawing Application | p. 299 |
Step 4 Naming and Testing Your Scratch 2.0 Project | p. 304 |
Chapter 13 Improving Code Organization | p. 305 |
Simplifying Script Organization Through Procedures | p. 305 |
Creating Custom Blocks | p. 306 |
Using a Define Block to Create a Procedure | p. 310 |
Adding Clarity Through Comments | p. 311 |
Simplifying the Project and Reducing the Project Size with Cloning | p. 313 |
Creating the Gone Fishing Application | p. 316 |
Step 1 Creating a New Scratch 2.0 Project | p. 318 |
Step 2 Adding an Appropriate Backdrop | p. 318 |
Step 3 Adding Your Application's Sprites | p. 318 |
Step 4 Defining an Application Variable | p. 320 |
Step 5 Creating Scripts Used to Control the Application | p. 321 |
Step 6 Testing Your Scratch 2.0 Project | p. 325 |
Chapter 14 Game Development Using Collision Detection | p. 327 |
Key Features Found in Most Computer Games | p. 327 |
Managing Game State | p. 328 |
Controlling Game Play with Loops | p. 330 |
Managing Screen Refresh Rates | p. 331 |
Moving Things Around the Stage | p. 331 |
Making Sprites Visible and Invisible | p. 332 |
Making Some Noise | p. 334 |
Detecting Collisions | p. 335 |
Collecting Player Input | p. 341 |
Capturing Keyboard Input | p. 341 |
Capturing Mouse Input | p. 342 |
Tracking Mouse Movement and Location | p. 343 |
Detecting Mouse Button Clicks | p. 343 |
Creating Scratch Pong | p. 344 |
Step 1 Creating a New Scratch 2.0 Project | p. 346 |
Step 2 Setting Up the Backdrop and Adding and Removing Sprites | p. 346 |
Step 3 Adding Sound Effects | p. 347 |
Step 4 Defining Variables | p. 347 |
Step 5 Creating Scripts Used to Control the Scratch Pong Game | p. 348 |
Step 6 Testing Your Scratch 2.0 Project | p. 353 |
Index | p. 355 |