JRBall Configuration
Sections:
- Param Tags
- Files
- Sample Configuration
- Scoring
There are 12 param tags. They are:
numballs
holesize
ballcolor1
ballcolor2
ballcolor3
bgcolor
fontcolor
holeimage
wallimage
ballimage
titleimage
titlecaption
"numballs" simply specifies how many balls each game should start
with. If this is left out, it is set to five.
"holesize" specifies how many pixels square the hole in the back
wall should be. If this is left out, it is set to 50.
"ballcolor1", "ballcolor2", and "ballcolor3"
specify the colors of the ball if "ballimage" isn't specified.
These must be RGB values without a '#' before it. For example, for blue
you would have "0000FF". "ballcolor1" and
"ballcolor2" are the two main colors while "ballcolor3" is
the warning color.
"bgcolor" specifies the color of the background and walls.
"fontcolor" specifies the color of the font and lines drawing the
walls.
"holeimage" specifies an image to be displayed in the area of the
hole. it is scaled to fit the "holesize".
"wallimage" specifies the image to be displayed on the back wall of
the court. It is tiled to fit.
"ballimage" specifies an image that should be used instead of the
"ballcolor"s. if both are specified, "ballimage" will
still be displayed instead of the colors. please note: with "ballimage"
there is no warning when the ball is about to be lost.
"titleimage" specifies the image to be displayed at the top of the
cover page. it should be 125x125 pixels but a slight variance is
alright. this tag is very important and the game will not work without it.
"titlecaption" specifies the caption to appear under "titleimage".
There are five required files for the actual game. They are
JRBall.class, Location.class, wall.au, swing.au, and miss.au. Each need to
be in the same directory (folder) as your HTML page. In addition to this,
you need to have your image files for the wall, ball, etc. in that same
directory.
Here is a sample configuration for JRBall:
<APPLET CODE="JRBall.class" WIDTH="450"
HEIGHT="300">
<PARAM NAME="numballs" VALUE="8">
<PARAM NAME="holesize" VALUE="25">
<PARAM NAME="ballcolor1"
VALUE="0000FF">
<PARAM NAME="ballcolor2"
VALUE="FF0000">
<PARAM NAME="ballcolor3"
VALUE="FFFF00">
<PARAM NAME="bgcolor"
VALUE="000000">
<PARAM NAME="fontcolor" VALUE="FFFFFF">
<PARAM NAME="holeimage" VALUE="hole.jpg">
<PARAM NAME="wallimage" VALUE="backwall.jpg">
<PARAM NAME="titleimage" VALUE="title.gif">
<PARAM NAME="titlecaption" VALUE="Come on
in to play JRBall!">
</APPLET>
In JRBall, the lower your score the better. Here is how the score is
calculated:
| Action |
Points |
| Hitting ball |
1 |
| Click and miss |
2 |
| Losing ball |
20 |
As you can see, it's really important not to lose balls. A perfect
score is equal to the number of balls the game starts with (i.e., if "numballs"
= 10, perfect score = 10).
Back to JRBall
New on the Java Boutique:
New Review:
Time Management Made Easy with the Quartz Enterprise Job Scheduler
Why not just use the Java timer API? This open source scheduling
API boasts simplicity, ease-of-integration, a well-rounded feature
set, and it's free!
New Applet:
Reverse Complement
Reverse Complement is a simple applet that converts DNA or RNA
sequences into three useful formats.
Elsewhere on internet.com:
WebDeveloper Java
Lots of Java information on webdeveloper.com
WDVL Java
Thorough Java resource at the Web Developer's Virtual Library.
ScriptSearch Java
Hundreds of free Java code files to download.
jGuru: Your View of the Java Universe
Customizable portal with online training, FAQs, regular news updates, and tutorials.
|