A webpage version of the classic 'Breakout' game in which a play tries to bounce a ball off his/her 'paddle' and eliminate layers of bricks. This version allows you to place an image in the background that is revealed as the bricks are knocked away.
The applet may be downloaded for free by clicking on the TAR-file link below (read the FAQ if you're not sure what to do with a TAR file). The FAQ also has step by step instructions on how to embed an applet into your own webpage.
Once unTARed, you should find the following classes (plus a '.jar' file if you want to use the archive= attribute in the <applet> tag):
Below are descriptions of all the parameters you may use to customize the applets to your webpages. Be sure to enclose any parameters that contain white space in double-quotation marks. Most parameters have default values in case you do not specify your own values, but the first two parameters (AUTHOR and COPYRIGHT) are necessary. If you are not sure how to incorporate an applet into a webpage (with its parameter names and values), looks at the source of this webpage and the applet embedded for an example, or read the FAQ page.
AUTHOR: This parameter must appear exactly as follows:
<param name=AUTHOR value="Eric Harshbarger, http://www.ericharshbarger.org">
COPYRIGHT: This parameter must appear exactly as follows:
<param name=COPYRIGHT value="BreakAway applet, Copyright 1999, Eric Harshbarger">
BGCOLOR: This parameter indicates the background color of the applet. Consult the FAQ page if you are unsure what format to use for the parameter's value.
FGCOLOR: This parameter indicates the foreground color of the applet. Consult the FAQ page if you are unsure what format to use for the parameter's value.
BACKGROUND: This parameter points to an image file that is used as a background to the applet. All the various texts of the applet will be painted on top of this image. Consult the FAQ page if you are unsure about what image formats you may use.
SPEED: This is the number of milliseconds between ball movements.
BALL.COUNT: This is the number of balls a player gets during the game.
PADDLE.WIDTH: This is the pixel width of the players 'paddle' used to bounce the ball back up.
SOUND.BRICK: A sound file that is played when the ball destroys a brick.
SOUND.MISS: A sound file that is played when the ball is missed by the player.
SOUND.WALL: A sound file that is played when the ball bounces off a side wall.
SOUND.WIN: A sound file that is played when all of the bricks are destroyed.
BRICK.WIDTH: This is the pixel width of the bricks to be destroyed. The number of bricks in a rows is determined by this formula:
(APPLET.WIDTH - 10) / BRICK.WIDTH
since the game walls (borders) are automatically 5 pixels each (total 10).
BRICK.HEIGHT: This is the height of the bricks.
TOP.ROW.START: This is the pixel position of the top of the first row of bricks (as calculated from the top edge of the applet's area).
ROW.COLORS: This parameter indicates not only the number of rows of bricks, but also the color of each row. The value of the parameter is a pipe (|) delimited sequence of RGB triplets.
The Applet Depot and all associated applets, text, scripts, and images, Copyright © 1998-2002 by Eric Harshbarger unless otherwise noted. 'Java' is a registered trademark of Sun Microsystems Incorporated.