You are previewing Scratch 1.4.
O'Reilly logo
Scratch 1.4

Book Description

Learn to program while creating interactive stories, games, and multimedia projects using Scratch

  • Create interactive stories, games, and multimedia projects that you can reuse in your own classroom

  • Learn computer programming basics – no computer science degree required

  • Connect with the Scratch community for inspiration, advice, and collaboration

  • Provides hands-on projects that help you learn by experiment and play

In Detail

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.

This hands-on tutorial teaches you the basics of computer programming using Scratch, a drag-and-drop language, so you can teach your students how to think and create digitally

Table of Contents

  1. Scratch 1.4
    1. Copyright
    2. Credits
    3. About the Author
    4. About the Reviewer
    5. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code for the book
        2. Errata
        3. Piracy
        4. Questions
    6. 1. Welcome to Scratch!
      1. What is Scratch?
        1. 21st century learning skills
        2. How to use Scratch?
      2. Programming concepts
        1. Programming limitations
      3. Scratch anatomy
        1. Building blocks
        2. Write the script
        3. Watch the story
        4. Built-in image editor
        5. Interface promotes tinkering
      4. Learning Scratch
        1. Welcome to Scratch!
        2. Installation
        3. Start Scratching
        4. Graphics and Slideshows
        5. Storytelling
        6. Arcade Games
        7. Games of Fortune
        8. Math and Finance
        9. Share!
        10. Real-world stimuli
      5. Summary
    7. 2. Installation
      1. Install Scratch
        1. Windows
          1. Run Scratch from flash drive
          2. Integrate Scratch with the PortableApps.com suite
        2. Installation on Macintosh
          1. Run Scratch on USB flash drive
        3. Installation on Linux
          1. Troubleshooting
          2. Limitations
          3. Wine and Scratch
      2. Confirm Java install
      3. Customize your Scratch installation
      4. Redistribute Scratch freely
        1. Source code license
        2. Share alike
      5. Summary
    8. 3. Start Scratching
      1. The interface at a glance
      2. Time for action - first step
        1. What just happened?
        2. Basics of a Scratch project
        3. We're all actors on Scratch's stage
        4. Pop quiz
      3. Time for action - save your work
      4. Set the cat in motion
      5. Time for action - a big step
        1. What just happened?
        2. Coordinating a sprite's location
        3. Double-click control
        4. Pop quiz
      6. Time for action - in motion forever
        1. What just happened?
          1. Loops play it again
      7. Time for action - get out of the corner
        1. What just happened?
        2. Have a go hero
          1. Undo an action
        3. Pop quiz
      8. Add sprites to the stage
        1. Get new sprites
      9. Time for action - spin sprite spin
        1. What just happened?
        2. Have a go hero
        3. Pop quiz
      10. Sometimes we need inspiration
        1. Browse Scratch's projects
      11. Time for action - spinner
        1. What just happened?
          1. Costume versus background
      12. Time for action - broadcast a message
        1. What just happened?
          1. Broadcast messages coordinate sprites
        2. Pop quiz
      13. Browse the Scratch community
      14. Time for action - create an account
        1. What just happened?
        2. Abide by the terms of use
      15. Time for action - download a project
        1. What just happened?
        2. Creative Commons
        3. Have a go hero
      16. Summary
    9. 4. Graphics and Slideshows
      1. Happy birthday wishes
      2. Time for action - paint a happy birthday sprite
        1. What just happened?
        2. Interface design
        3. Set the stage
      3. Time for action - paint the stage
        1. What just happened?
        2. Adding gradients
        3. Have a go hero
        4. Pop quiz
        5. Sprite costumes
      4. Time for action - address the card
        1. What just happened?
          1. Working with sprites
        2. Animating the card
      5. Time for action - hide all sprites
        1. What just happened?
      6. Time for action - display happy birthday
        1. What just happened?
        2. Sprite names
      7. Time for action - roll call
          1. Choose appropriate names
        1. Graphical transformations
      8. Time for action - give me an "M"
        1. What just happened?
          1. Loop with repeat
        2. Pop quiz
          1. Incremental improvements
      9. Time for action - give me another "M"
        1. What just happened?
      10. Time for action - set first M straight
        1. What just happened?
        2. Have a go hero give me an "O"
          1. Beware of gaudiness
      11. Time for action - give mom flowers
        1. What just happened?
          1. Ghosting an image
        2. Have a go hero
        3. Parallel execution
        4. Next steps
      12. Build a photo slideshow
      13. Time for action - insert a title screen
        1. What just happened?
      14. Time for action - import photos from disk
        1. What just happened?
          1. Image formats
        2. Working with images
          1. Resize images
          2. How to measure images
      15. Time for action - flip through the photos
        1. What just happened?
        2. Have a go hero
        3. Building audience participation
      16. Time for action - present your show
        1. Pop quiz
        2. Next steps
      17. Summary
    10. 5. Storytelling
      1. Barnyard humor
        1. Table of contents
      2. Time for action - create TOC
        1. What just happened?
        2. Have a go hero
        3. Add pages to our book
      3. Time for action - add new pages
        1. What just happened?
        2. Hide that sprite
      4. Time for action - hide the sprites
        1. Introducing the horse
      5. Time for action - import the horse
        1. Costumes versus sprites
        2. The horse speaks
      6. Time for action - the horse talks
        1. What just happened?
          1. Synchronize the action
      7. Time for action - revise the horse talks exercise
        1. What just happened?
        2. Sound
      8. Time for action - a horse whinnies
        1. What just happened?
          1. Sound formats
        2. The dog enters
      9. Time for action - bring out the dog
        1. X and Y coordinates mark the spot
      10. Time for action - stay dog
        1. What just happened?
          1. Position on the grid
        2. Pop quiz
        3. Pointed in the right direction
      11. Time for action - turn to the left
        1. What just happened?
          1. Degrees of direction
        2. Sound effects
      12. Time for action - hit the cymbals
        1. What just happened?
          1. Select an instrument
      13. Time for action - applause, please
        1. What just happened?
          1. Play a note
        2. Have a go hero
        3. Pop quiz
        4. Piece the dog scene together
      14. Time for action - joke, please
        1. What just happened?
        2. Have a go hero
        3. Control the story
      15. Time for action - hide TOC
        1. What just happened?
        2. Have a go hero
      16. Time for action - enter dog
        1. What just happened?
      17. Time for action - exit dog
        1. What just happened?
        2. Have a go hero
      18. Time for action - show TOC
        1. What just happened?
        2. Have a go hero
          1. Build sequence
        3. Have a go hero
        4. Next steps
      19. Summary
    11. 6. Arcade Games
      1. Troll pong
      2. Time for action - open the sample pong project
        1. What just happened?
        2. Dynamic interaction
        3. Variables
      3. Time for action - change direction
        1. What just happened?
      4. Time for action - remove the random turn
        1. What just happened?
        2. Have a go hero
        3. Customize the sprites
      5. Time for action - beach ball pong
        1. What just happened?
        2. Have a go hero
      6. Time for action - add new paddle controls
        1. What just happened?
        2. Play theme music, forever
      7. Time for action - add background music
        1. What just happened?
          1. Do something, forever
          2. Working with sound
        2. Have a go hero
        3. Pop quiz
        4. Forever, on one condition
      8. Time for action - paddle meets ball
        1. What just happened?
          1. Start single stepping
        2. What just happened?
          1. Conditional statements
        3. Pop quiz
        4. What's the score?
      9. Time for action - add a score variable
        1. What just happened?
          1. For all sprites
          2. For this sprite only
      10. Time for action count the paddle's steps
        1. What just happened?
          1. Global versus local variables
        2. Have a go hero
        3. Add a second level
      11. Time for action reach for a new level
        1. What just happened?
          1. Comparisons
          2. Troubleshooting
      12. Time for action fix the script
        1. What just happened?
          1. Using Boolean logic
        2. Pop quiz
        3. Add levels
      13. Time for action - count the levels
        1. What just happened?
        2. Have a go hero
      14. Time for action - enter project notes
        1. What just happened?
        2. Next steps
      15. Summary
    12. 7. Games of Fortune
      1. Fortune-teller
      2. Time for action - create a list of questions
        1. What just happened?
        2. Have a go hero
        3. Work with an item in a list
        4. Import a list
      3. Time for action - import a list of fortunes
        1. What just happened?
          1. Reasons to import
          2. Export a list
        2. Pop quiz
        3. Your fortune is …
      4. Time for action - tell me a fortune
        1. What just happened?
      5. Time for action - force a positive fortune
        1. What just happened?
          1. Counters
          2. Keep track of intervals with mod
        2. Have a go hero
          1. If/else
        3. Pop quiz
        4. Repeat the fortune
      6. Time for action - my fortune is what?
        1. What just happened?
          1. Holding text in a variable
      7. Do you have a question?
      8. Time for action - ask your question
        1. What just happened?
        2. Add the question to the list
      9. Time for action - add it to the list
        1. What just happened?
        2. Join two text phrases
      10. Time for action - join two sentences
        1. What just happened?
          1. Nest join blocks
          2. Additional string operations
        2. Next steps
      11. Summary
    13. 8. Math and Finance
      1. Double it or lump sum?
        1. Double it
      2. Time for action - calculate the double amount
        1. What just happened?
        2. Have a go hero
      3. Time for action - set user-defined variables
        1. What just happened?
          1. Start single stepping
      4. Time for action slow it down
        1. Graph the values
      5. Time for action set the graph’s origin
        1. What just happened?
      6. Time for action - draw a graph
        1. What just happened?
          1. Mathematical functions
          2. Create patterns with stamp
        2. Pop quiz
        3. Connect the dots
      7. Time for action connect the dots
        1. What just happened?
      8. Time for action - fix the graph
          1. Follow a sprite with the go to block
          2. Draw with the pen tool
      9. Time for action - draw the x and y axis of the grid
        1. What just happened?
        2. Have a go hero
          1. Label the newAmount value
      10. Time for action - label newAmount
        1. What just happened?
        2. Pop quiz
        3. Find the interest earned on a lump sum
      11. Time for action - calculate interest on lump sum
        1. What just happened?
        2. Have a go hero
          1. Round to nearest whole number
        3. Have a go hero
      12. Next steps
      13. Summary
    14. 9. Share!
      1. Share with the Scratch community
        1. Reduce file size
      2. Time for action - compress media files
        1. What just happened?
        2. Share!
      3. Time for action - share!
        1. What just happened?
          1. Tag it
          2. Update a project
        2. Trouble?
          1. Firefox display problems
          2. Variables change positions
        3. Link to your project
          1. Embed in a blog post
          2. Embed an applet or an image?
        4. Share via social networks
        5. Subscribe to projects via RSS
          1. How to subscribe
      4. Host your Scratch projects
        1. Install files to a web server
      5. Time for action - install files on a web server
        1. What just happened?
          1. Limitations of self-hosting
        2. Pop quiz
      6. Summary
    15. 10. Real-world stimuli
      1. Import webcam pictures
      2. Time for action - say cheese
        1. What just happened?
        2. Working with camera images
          1. Export a sprite
      3. PicoBoard—what is it?
        1. Order a PicoBoard
      4. Install the PicoBoard
        1. Connect the PicoBoard
      5. Capture sound input
      6. Time for action - switch backgrounds on sound
        1. What just happened?
        2. Have a go hero
          1. Sound as a numeric value
      7. Time for action use sound to change the sprite's looks
        1. What just happened?
        2. Have a go hero
      8. Click for the next slide
      9. Time for action - click for the next slide
        1. What just happened?
          1. True or false values
      10. Time for action - wait until button not pressed
        1. What just happened?
      11. Step into the light, please
      12. Time for action -
        1. What just happened?
        2. Using light to detect motion
        3. Have a go hero
      13. Control motion with the slider
      14. Time for action - slide sensor
        1. What just happened?
        2. Using gravity
        3. Have a go hero
      15. Create circuits
      16. Time for action - complete the circuit
        1. What just happened?
        2. Wiring our projects
        3. Measure electrical resistance
      17. Time for action - measure resistance
        1. What just happened?
          1. Using resistance
        2. Have a go hero
      18. Watch all sensor values
        1. Have a go hero
        2. Pop quiz
      19. LEGO WeDo support
      20. Summary
    16. A. Scratch Resources