Scratch programming playground : learn to program by making cool games

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Author(s): Al Sweigart
Publisher: No Starch Press
Year: 2016

Language: English
Pages: 294
City: San Francisco
Tags: Programming for kids, teens

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