bigbadbrain logo
bbb Home
  Lesson 7 - Complete Game
 

SUMMARY

In this lesson we will add code to complete the game.  You will use concepts that you learned in previous lessons. 

GAME DEVELOPMENT

1.  Modify your game so that the score increases by one everytime the ball hits the paddle.  

2. Modify the game so that the game ends when the ball passes the paddle.  Ensure that the ball stops moving and a message appears saying that the game is over and that the user should click a key to start a new game.

3. Ensure that when the user presses a key to start a new game, the score resets back to 0. 

4. Ensure that when the user presses a key to restart the game, the timer is cleared so that the ball does not keep going faster and faster.

5. Test your program to ensure that there are no bugs. 

6. Extra - Make the paddle movement be controlled by the mouse by setting the paddle's horizontal location to window.event.clientX when the user moves the mouse on the page.
©dfx interactive, inc. Contact us at bigbadbrain@bigbadbrain.com