Sweigart Al - Scratch 3 Programming Playground. Learn To Program By Making Cool Games.pdf

(26855 KB) Pobierz
CONTENTS IN DETAIL
COVER
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
Zgłoś jeśli naruszono regulamin