Pong-Very+Basic-Single+Player

__Pong - Very Basic - Single Player__
Start a new project and name it.

Write instructions: Tell how to play the game. Tell what is accomplished in the game.

For example: Move the mouse or arrow keys to control the paddle. Keep the ball from falling into the lava.

__1st Block Stack for the Ball__: Make the ball go up and down bouncing off the top and bottom. Select or draw a ball to use as a sprite.

Start with a 'point in direction' block to pick the direction the block will start. Now insert a "pick random" "Operater" block where the "90" is. Change the "1" in the "pick random" block to "0". Change the "10" to "360".

Next put a "Forever Loop" "Control block" below the point in direction block.

Put a "if on edge, bounce" "Motion" block in the loop so the ball will bounce when it reaches the edge of the background.

Now make the ball move by putting a "move steps" "Motion" block below the "bounce" block. Change the number of steps from 10 to 4 to slow the ball down.

Put a "When Clicked" Events block at the top of the stack.

Now test your stack of program blocks.

__2nd Block Stack for the Ball__:

Making the ball reverse direction and make a sound when it hits the paddle.

Start a second program stack for the ball with a "when clicked" "Event" block. . Add a "forever" "Command" block to the bottom of the stack.

Put a "if then" command block inside the forever loop.

"Sensing" and "Operator" blocks can be put between the "if" and "then" of the above block. Put a "Touching" block from the "Sensing" block-type in the "it then" block. Click the arrow in the "touching" block and have it show the name of your paddle sprite. (Paddle graphic) Now put a "Play Sound" block inside the "if then" block.

So far the stack should look like this producing sounds if the ball were to touch sprite 2.

Now blocks will be added inside the "if touching <> then" block to reverse the ball's direction. If this block was added, the ball would bounce straight up off the paddle. To bounce off the paddle normally, the ball should bounce off the paddle at the same angle that it hits the paddle at. This is called the law of reflection. Two more blocks are needed to get the bounce correct. One block is of the "Operator" block-type and the other is a motion block. Assembled the blocks should look like this. Below this, a block is needed to get the ball moving off the paddle. To add some interest to the game and emulate spin, an additional small random angle is added to the bounce.

__1st Block Stack for the Paddle__: Make a stack of blocks that moves the paddle left and right using the arrow keys.

__1st Block Stack for the Lava__: Draw or select a sprite to be lava under the paddle. Have the ball be destroyed if it hits the lava. Make the lava change when the ball touches the lava.

__1st Block for Health or Keeping score__: Make a stack to monitor health or keep score:

pong_source