Pong Game 2

by victor mbale in Living > Toys & Games

338 Views, 2 Favorites, 0 Comments

Pong Game 2

scratch 1.PNG

Hello, and welcome to my second pong game instructable.

In the first game you were only able to play alone, now you can play with a friend.

And just as the first game all you need is a scratch account and a laptop or desktop.

Sprites and Backdrop

final snip.PNG

Firstly we add the sprite and back drop(which for me are the same as the first time)

CODE THE PADDLES

scrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr.PNG
scratch.PNG

First we use WHEN GREEN FLAG CLICKED block.

Then pull out 2 WHEN SPACEBAR CLICKED blocks for each paddle, then replace space with the controls for each paddle.

Under each block add a CHANGE X BY 10 block(NOTE:It doesn't need to be by 10)

CODE THE BALL

scatch 3.PNG

To code the ball, start with a when GREEN FLAG CLICKED block, then a FOREVER BLOCK.

Inside it 2 IF blocks from control(use one to enter code for paddle)

To add a score, go to variable, create a variable and name it score.(Usually I'd tell you to make a variable for all sprite but this time each sprite has it's own)

All that's left is start playing!!!