Pong Game Cards - Scratch Resources Browser

Transcription

Pong GameCardsMake a bouncing ball game andscore points to win!scratch.mit.eduSet of 6

Pong GameCardsUse these cards in this order:1. Bounce Around2. Move the Paddle3. Bounce off the Paddle4. Game Over5. Score Points6. Win the Gamescratch.mit.eduSet of 6

Bounce AroundMake a ball move around the Stage.Pong Game1

Bounce Aroundscratch.mit.eduGET READYChoose abackdrop.Neon TunnelChoose a ball.ADD THIS CODEBallType a larger numberto move faster.TRY ITClick the green flag to start.

Move the PaddleControl a paddle by movingyour mouse pointer.Pong Game2

Move the Paddlescratch.mit.eduGET READYPaddleChoose a sprite for hittingthe ball, like Paddle.Then, drag your paddle tothe bottom of the Stage.ADD THIS CODEInsert the mouse x blockinto the set x to block.PaddleTRY ITMove your mouse pointerto move the paddle.Click the greenflag to start.TIPYou can see the x position of the paddlechange as you move the mouse pointeracross the Stage.

Bounce Off the PaddleMake the ball bounce off the paddle.Pong Game3

Bounce Off the Paddlescratch.mit.eduGET READYClick to select the Ball sprite.ADD THIS CODEAdd this new stack of blocks to your Ball sprite.Choose Paddlefrom the menu.BallInsert the pick randomblock and type in 170 to 190TRY ITClick the green flag to start.

Game OverStop the game if the ball hits the red line.Pong Game4

Game Overscratch.mit.eduGET READYLineChoose the sprite called Line.Drag the Line sprite to thebottom of the Stage.ADD THIS CODESet the position of the Line.LineChoose Ballfrom the menu.TRY ITClick the green flag to start.

Score PointsAdd a point each time you hit the ball withthe paddle.Pong Game5

Score Pointsscratch.mit.eduGET READYChoose Variables.ScoreClick the Make aVariable button.Name this variable Scoreand then click OK.ADD THIS CODEClick to select theBall sprite.Add this block andchoose Score fromthe menu.Use this block to reset the score.Choose Score from the menu.

Win the GameWhen you score enough points, display awinning message!Pong Game6

Win the Gamescratch.mit.eduGET READYUse the Text tool to write amessage, like “You Won!”You can change the fontcolor, size, and style.Click the Paint iconto make a new sprite.ADD THIS CODEClick the Code tab.Type the number of pointsneeded to win the game.Insert the Score blockinto the equals block fromthe Operators category.TRY ITClick the greenflag to start.Play until you scoreenough points to win!

Pong Game Cards Use these cards in this order: 1. Bounce Around 2. Move the Paddle 3. Bounce off the Paddle 4. GameOver 5. Score Points