Time for action - remove the random turn

We're going to remove the block that tells the ball to turn a random number of degrees and see what happens:

  1. Drag the turn clockwise degrees block to a blank spot in the scripts area so that it doesn't run when we play the game.
  2. Click on the flag. Each time the ball hits the paddle, it bounces straight up. Your script should look like the following screenshot:
Time for action - remove the random turn

What just happened?

You didn't need any skill or coordination in this game, as long as you hit the ball the first time. The trajectory of the ball never changed; it went straight up and came straight back down.

I made a sandwich while the ball bounced off the paddle. That's not exactly fun.

The point in direction block and the turn clockwise degrees block that calculates a random value between -20 and 20 work together to affect how the ball bounces off the paddle.

Have a go hero

Get the script back to its original state. Add the number block 180 direction back to the input value of the point in direction block. Add the random turn block back to the script.

Experiment with and select new directions, if you wish.

Customize the sprites

The first real change we want to make to the pong project is to add a new ball. We will also change the appearance of the paddle. However, we want to make sure we keep the original scripts in place. Let's take a look.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.216.94.152