HISCORE: The Hiscore Manager for GeoCities
Installation and Description
|
Hiscore is a simple class that performs a hiscore manager.
Have you developed an online Java game and do you want to store the players' hiscores? It's possible if you homestead at GeoCities using Hiscore. It uses your GuestBook (geobook.html) to store players' info and it's easily called from any applet of yours. You haven't to sacrify your GuestBook, however a clean one increases performances. Have a nice play time and could your score be the first forever!
|
Description and Installation
After downloading Hiscore.zip you have these files:
- Hiscore.class The Java class file.
- Hiscore.java The source code.
- Hiscore.html Javadoc generated documentation from Hiscore.java, useful for fast reference.
- geobook.html A clean geobook.html (Hiscore needs at least this to work).
- TestHiscore.java The source code of an Applet that can be used for testing purposes (only online) and as an example.
- TestHiscore.class The compiled version of the test.
- TestHiscore.html The HTML page that calls the test.
Once you have these files, you must send to your directory in GeoCities at least Hiscore.class (REMEMBER! "Hiscore" has the 'H' uppercase and the servers of GeoCities are case sensitive). You can send even TestHiscore.class and TestHiscore.html for test purposes. If you don't have a GuestBook.html in your directory, send the one in the ZIP file.
How to use it?
First of all you must develop a game. If you are interested in this article may be you have already developed a game. So, how to use the Hiscore.class?. It's really simple: there is only a constructor and two methods (see the Javadoc generated documentation for more details).
- The Constructor Hiscore(Applet applet, String gameName) needs a reference to the calling applet and a name for the game. This last argument is useful to support multiple games.
- The method Vector getHiscores() returns a Vector containing the stored players' information. This Vector contains String[3] references. The first String of the array is the player's name, the second contains some additional information (e.g. his/hers preferred wisecrack) and the last is the score. All the players stored in the GuestBook.html are retrieved.
- The method void addHiscore(String name, String wisecrack, String score ) adds a player to the GuestBook.html.
These methods are so simple and generic in order to allow personalization, such as encryption of the data and so on. Refer to the source code TestHiscore.java included in the ZIP file for further information.
It's not possible to remove entries using this class. Use the Advanced HTML Editor of GeoCities instead.
More Questions?
For any question or suggestion, please use the comments form or write directly to TETRACTYS Freeware.
|
 |
In the next Issue Java GeoUtilities will be
?
|  |
---|