0%

Scratch, the colorful drag-and-drop programming language, is used by millions of first-time learners worldwide. Scratch 3 features an updated interface, new programming blocks, and the ability to run on tablets and smartphones, so you can learn to code on the go.

In Scratch 3 Programming Playground, you’ll learn to code by making cool games. Get ready to destroy asteroids, shoot hoops, and run mazes! Each game includes easy-to-follow instructions with full-color images, review questions, and creative coding challenges. Want to add more levels or a cheat code? No problem, just write some code.

You’ll learn to make games like:

•Maze Runner, a maze navigation challenge
•Rainbow Lines, a dazzling animation program
•Asteroid Breaker, a space adventure game
•Basketball, a gravity-based game of hoops
•Brick Breaker, a remake of Breakout, the brick-breaking classic
•Platformer, a game inspired by Super Mario Bros.

Learning how to program shouldn’t be dry and dreary. With Scratch 3 Programming Playground, you’ll make a game of it!

Uses Scratch 3

Table of Contents

  1. Cover
  2. Titlepage
  3. PRAISE FOR SCRATCH PROGRAMMING PLAYGROUND
  4. Copyright
  5. Dedication
  6. About the Author
  7. About the Technical Reviewer
  8. Acknowledgments
  9. Introduction
    1. Who This Book Is For
    2. About This Book
    3. How to Use This Book
    4. Online Resources
    5. Errata and Updates
  10. Chapter 1: Getting Started with Scratch
    1. Running Scratch
    2. Scratch Desktop: The Offline Editor
    3. The Scratch Editor and Sprites
    4. The Paint Editor
    5. Working with Code Blocks
    6. Adding Blocks
    7. Deleting Blocks
    8. Running Programs
    9. Showing Off Your Programs
    10. Getting Help
    11. The Tutorials Window
    12. The See Inside Button
    13. Summary
  11. Chapter 2: Rainbow Lines . . . in Space!
    1. Sketch Out the Design
    2. A. Create the Space Backdrop
    3. 1. Clean Up and Set the Stage
    4. B. Create Three Bouncing Dots
    5. 2. Paint the Dot
    6. 3. Add Code for the Dot 1 Sprite
    7. 4. Duplicate the Dot 1 Sprite
    8. C. Draw the Rainbow Lines
    9. 5. Add the Code for the Drawing Dot Sprite
    10. The Complete Program
    11. Turbo Mode
    12. Summary
  12. Chapter 3: Maze Runner
    1. Sketch Out the Design
    2. A. Make the Cat Walk Around
    3. 1. Add Movement Code to the Player Sprite
    4. 2. Duplicate the Movement Code for the Cat Sprite
    5. B. Make the Maze Levels
    6. 3. Download the Maze Images
    7. 4. Change the Backdrop
    8. 5. Start at the First Maze
    9. C. Keep the Cat from Walking Through Walls
    10. 6. Check Whether the Cat Is Touching the Walls
    11. D. Make a Goal at the End of the Maze
    12. 7. Create the Apple Sprite
    13. 8. Detect When the Player Reaches the Apple
    14. 9. Add the Broadcast Handling Code to the Maze Sprite
    15. The Complete Program
    16. Version 2.0: Two-Player Mode
    17. Duplicate the Apple Sprite
    18. Modify the Apple2 Sprite’s Code
    19. Duplicate the Orange Cat Sprite
    20. Modify the Code for the Blue Cat Sprite
    21. Go Back to the Starting Position
    22. Cheat Mode: Walk Through Walls
    23. Add the Walk-Through-Walls Code to Orange Cat
    24. Add the Walk-Through-Walls Code to Blue Cat
    25. Summary
  13. Chapter 4: Shooting Hoops with Gravity
    1. Sketch Out the Design
    2. A. Make the Cat Jump and Fall
    3. 1. Add the Gravity Code to the Cat Sprite
    4. 2. Add the Ground-Level Code
    5. 3. Add the Jumping Code to the Cat Sprite
    6. B. Make the Cat Move Left and Right
    7. 4. Add the Walking Code to the Cat Sprite
    8. C. Make a Hovering Basketball Hoop
    9. 5. Create the Hoop Sprite
    10. 6. Create the Hitbox Sprite
    11. D. Make the Cat Shoot Hoops
    12. 7. Create the Basketball Sprite
    13. 8. Add the Code for the Basketball Sprite
    14. 9. Detect Whether a Basket Is Made
    15. 10. Fix the Scoring Bug
    16. The Complete Program
    17. Cheat Mode: Freeze the Hoop
    18. Summary
  14. Chapter 5: A Polished Brick Breaker Game
    1. Sketch Out the Design
    2. A. Make a Paddle That Moves Left and Right
    3. 1. Create the Paddle Sprite
    4. B. Make a Ball That Bounces Off the Walls
    5. 2. Create the Tennis Ball Sprite
    6. C. Make the Ball Bounce Off the Paddle
    7. 3. Add the Bounce Code to the Tennis Ball Sprite
    8. D. Make Clones of the Brick
    9. 4. Add the Brick Sprite
    10. 5. Clone the Brick Sprite
    11. E. Make the Ball Bounce Off Bricks
    12. 6. Add the Bounce Code to the Brick Sprite
    13. F. Make “You Win” and “Game Over” Messages
    14. 7. Modify the Tennis Ball Sprite’s Code
    15. 8. Create the Game Over Sprite
    16. 9. Create the You Win Sprite
    17. The Complete Program
    18. Version 2.0: Polishing Time
    19. Draw a Cool Backdrop
    20. Add Music
    21. Make the Paddle Flash When Hit
    22. Add an Animated Entrance and Exit to the Bricks
    23. Add a Sound Effect to the Brick Exit
    24. Add a Sound Effect to the Tennis Ball
    25. Add a Trail Behind the Tennis Ball
    26. Add an Animated Entrance for the Game Over Sprite
    27. Add an Animated Entrance for the You Win Sprite
    28. Summary
  15. Chapter 6: Asteroid Breaker . . . in Space!
    1. Sketch Out the Design
    2. A. Make a Spaceship That Is Pushed Around
    3. 1. Create the Spaceship Sprite
    4. B. Make the Spaceship Wrap Around the Edges
    5. 2. Add the Wrap-Around Code to the Spaceship Sprite
    6. 3. Add the Random-Push Code to the Spaceship Sprite
    7. C. Aim with the Mouse and Fire with the Spacebar
    8. 4. Create the Energy Blast Sprite
    9. D. Make Asteroids That Float Around
    10. 5. Create the Asteroid Sprite
    11. E. Make Asteroids Split in Two When Hit
    12. 6. Add the Asteroid’s Splitting Code
    13. 7. Add the Asteroid Blasted Message Code to the Energy Blast Sprite
    14. F. Keep Score and Make a Timer
    15. 8. Create the Out of Time Sprite
    16. G. Make the Spaceship Explode If It Is Hit
    17. 9. Upload the Explosion Sprite
    18. 10. Add the Code for the Explosion Sprite
    19. 11. Add the Explode Code to the Spaceship Sprite
    20. Version 2.0: Limited Ammo
    21. Cheat Mode: Starburst Bomb
    22. Summary
  16. Chapter 7: Making an Advanced Platformer
    1. Sketch Out the Design
    2. A. Create Gravity, Falling, and Landing
    3. 1. Create the Ground Sprite
    4. 2. Add the Gravity and Landing Code
    5. 3. Make the Cat Walk and Wrap Around the Stage
    6. 4. Remove the Ground Lift Delay
    7. B. Handle Steep Slopes and Walls
    8. 5. Add the Steep Slope Code
    9. C. Make the Cat Jump High and Low
    10. 6. Add the Jumping Code
    11. D. Add Ceiling Detection
    12. 7. Add a Low Platform to the Ground Sprite
    13. 8. Add the Ceiling Detection Code
    14. E. Use a Hitbox for the Cat Sprite
    15. 9. Add a Hitbox Costume to the Cat Sprite
    16. 10. Add the Hitbox Code
    17. F. Add a Better Walking Animation
    18. 11. Add the New Costumes to the Cat Sprite
    19. 12. Create the Set Correct Costume Block
    20. G. Create the Level
    21. 13. Download and Add the Stage Backdrop
    22. 14. Create a Hitbox Costume for the Ground Sprite
    23. 15. Add the Ground Sprite’s Code
    24. 16. Add More Wrap-Around Code to the Cat Sprite
    25. H. Add Crab Enemies and Apples
    26. 17. Add the Apple Sprite and Code
    27. 18. Create the Crab Sprite
    28. 19. Create the Enemy Artificial Intelligence
    29. 20. Add the Time’s Up Sprite
    30. Summary
  17. Where to Go From Here
  18. Index
34.239.170.244