Breakout is a popular extension to the game of Pong that has been described as "the ultimate in Pong". Breakout was designed by Steve Jobs, CEO of Apple Computer. But it was Job's friend Steve Wozniak who did most of the work on Breakout, not Jobs. However Jobs received a $5,000 bonus for the work but told Wozniak it was only $700 and gave Wozniak his "50%" --- $350. Years later this truth would come out and it would add to the already increasing friction between the two which eventually lead to Steve Wozniak quitting Apple.
In breakout a ball bounces around the screen and destroys blocks as it bounces into them. The ball can bounce off of the top and sides of the screen. If the ball moves off the bottom of the screen, the player loses a life. The player controls a paddle at the bottom of the screen to block the ball from moving off the bottom. If the player misses blocking the ball three times, the game should end with the player as the loser. If all the blocks are cleared from the screen, the game should end with the player as a winner.
You will be given a basic version of the game in which a ball starts in the center of the screen and falls towards your paddle. There will also be one block on the screen that will disappear when hit. The paddle's motion is controlled by the mouse. There are two classes that make up this game:
Breakout (the game) and
ProjectileTracker (which moves the ball each step of the game). You should not need to modify the tracker class.
In the class
Breakout, you should add code to make a collection of blocks in rows across the top of the screen and indicators that show how many lives the player has remaining and how many blocks have been cleared (i.e., a score). Then you should add code to detect when the player loses a life and subtracts it from their total, resets the ball to the center of the screen. If it is the third time, the game should end and display a message that declares the player a loser. You should also add code that adds to the player's score each time a block is hit and disappears. If all the blocks have been cleared, the game should end and display a message that declares the player a winner.
Note, you will have to spend some time choosing fixed values for the size of the paddle, speed of the ball, and size of the blocksin order to ensure the game is fun to play. Include some discussion of why you chose the values you did in your code's comments. Note, you do not need to do anything more to implement bouncing than is already given in the code you download for the project.
Once you have the basic game working, you can add a variety of features to make your game more fun to play (listed below roughly in order of difficulty):
Please include, on your applet website, a description of the extra credit features you attempted so that there is less chance we miss them when we are grading your assignment.
Breakout. You can run
Breakouteither as an applet or an application.