Brick BReaker


The brick breaker game looks like this when you finish it.

Step 1 - Add the Paddle sprite by clicking on the head-shaped button next to New Sprite.




Step 2 - Delete the orange cat by right-clicking on it and selecting "Delete"




Step 3 - Add this code to the Paddle sprite.




Step 4 - Add this code to the Paddle sprite.




Step 5 - Add this code to the Paddle sprite.




Step 6 - Add this code to the Paddle sprite.




Step 7 - Add this code to the Paddle sprite.




Test #1 - Check that the paddle moves along the bottom, following the mouse pointer.




Step 8 - Add the Tennis Ball sprite.




Step 9 - Add this code to the Tennis Ball sprite.




Step 10 - Add this code to the Tennis Ball sprite.




Step 11 - Add this code to the Tennis Ball sprite.




Step 12 - Add this code to the Tennis Ball sprite.




Step 13 - Add this code to the Tennis Ball sprite.




Test #2 - Check that tennis ball bounces off the edges of the Stage.




Step 14 - Add this code to the Tennis Ball sprite.




Step 15 - Add this code to the Tennis Ball sprite.




Step 16 - Add this code to the Tennis Ball sprite.




Step 17 - Add this code to the Tennis Ball sprite.




Step 18 - Add this code to the Tennis Ball sprite.




Step 19 - Add this code to the Tennis Ball sprite.




Test #3 - Check that the tennis ball bounces off the Paddle sprite.




Step 20 - Add the Button 2 sprite




Step 21 - Add this code to the Button 2 sprite.




Step 22 - Create the Score variable.




Step 23 - Add this code to the Button 2 sprite.




Step 24 - Add this code to the Button 2 sprite.




Step 25 - Add this code to the Button 2 sprite.




Step 26 - Add this code to the Button 2 sprite.




Step 27 - Add this code to the Button 2 sprite.




Step 28 - Add this code to the Button 2 sprite.




Step 29 - Add this code to the Button 2 sprite.




Step 30 - Add this code to the Button 2 sprite.




Step 31 - Add this code to the Button 2 sprite.




Test #4 - Check that tennis ball bounces off bricks




Step 32 - Add this code to the Tennis Ball sprite.




Step 33 - Add this code to the Tennis Ball sprite.




Step 34 - Add this code to the Tennis Ball sprite.




Step 35 - Add this code to the Tennis Ball sprite.




Step 36 - Create the Game Over sprite




Step 37 - Rename the new sprite to "Game Over"




Step 38 - Add this code to the Game Over sprite.




Step 39 - Add this code to the Game Over sprite.




Step 40 - Add this code to the Game Over sprite.




Test #5 - Check that game ends if you miss the ball.




Step 41 - Create the You Win sprite




Step 42 - Rename the new sprite to "You Win"




Step 43 - Add this code to the You Win sprite.




Step 44 - Add this code to the You Win sprite.




Step 45 - Add this code to the You Win sprite.




Step 46 - Add this code to the You Win sprite.




Step 47 - Add this code to the You Win sprite.




Test #6 - Check that you win if you break all 28 blocks.