Comweb, Klappenburgstraat 94, 6681XT Bemmel, Nederland  
Email: sales@comweb.nl


  Sorry Your browser doesn't support Java.
Use a java enabled browser and a 32 bit operating system
Such as Windows 95 and (Ms explorer 3.0 or Netscape 2.0 or higher
 
Download
© Comweb.nl , RJHM van den Bergh , sales@comweb.nl



Falling Stars
©1996 RJHM van den Bergh
rvdb@comweb.nl
http://www.comweb.nl/~rvdb
(former rvdb@nedernet.nl)

Copyright notice:
In unchanged form this applet is TOTAL FREEWARE.
Distribution is allowed without written permission!

Reason: This applet is used to promote my sites.
When the game has finished the user can choose to play again or visit my site.


Disclaimer:
The use is at your own risk.
But in case you might discover a bug please report it to me.


Requirements:
Java must be installed on your computer.
If not please look http://java.sun.com or if that my not help search google.
It is tested on Java version 1.7.0_07 with Firefox 15.01 Windows XP SP3
It is possible that on very old Java versions it will not work.
For example java 1.02 because it has the new event handling system installed.
If you want an older version send a request to sales@comweb.nl


Installation:
How do I get this applet on my homepage?

I assume here a very little knowledge of html.
This means you should be able to create a simple homepage.

Step 1:
Insert the following code into your html page.
<APPLET CODE="FallingStars.class" WIDTH="480" HEIGHT="270" align="middle">
Sorry your browser doesn't support Java.<BR>
Use a java enabled browser and a 32 bit operating system.<BR>
Such as Windows 95 and (Ms explorer 3.0 or Netscape 2.0 or higher.<BR>
</APPLET>

Step 2:
Put the following files in the same directory as the html file.
FallingStars.class (the java applet program)
ship.gif           (picture off ship)
shipexplode.gif    (picture off exploding ship)
star.gif           (picture off a star)
shipexplode.au     (sound off exploding ship)
explosion.au       (sound off exploding star)
laser.au           (sound off the laser)
alert.au           (sound off sirene)

NOTE :
WATCH the letter casing off the files.
Some ftp and old unpacking software changes the letter casing.
(FallingStar.class is not equal to fallingstar.class etc.
You then will get the message class FallingStar not found).


DISCRIPTION OFF TAGS :

<APPLET CODE="FallingStars.class" WIDTH="480" HEIGHT="270" align="middle">
This tells the browser that there is an applet on this html page.
The CODE attribute ONLY tells the name off the applet program file.
By default the browser expects all files into the same directory as the html file.

To change the place use the codebase attribute.
Please note that the codebase attribute changes the expected place of the other files. CodeBase example:
<applet codebase="http://www.blabla.com/blabladir/bladir/" code="someblabla.class" height="100" width="100"> Please note that its best to omit the codebase attribute.
Its a source of trouble

Width and height are the size off the java applet
Note you can change this applet to any size you want.
It automatically adjusts all parameters.

There are a very few browsers that don't support Java.
(Currently less then 1% at January 2001)
So you should place a notice for these users.
When a browser doesn't support Java the normal html tags between the applet tags are executed.
Sorry your browser doesn't support Java.<BR>
Use a java enabled browser and a 32-bit operating system<BR>
Such as Windows 95 and (Ms explorer 3.0 or Netscape 2.0 or higher<BR>

<PARAM NAME="CABBASE" VALUE="fallingstars.cab">
This tag is only used by Ms Explorer browsers.
A cab file is an archive file.
This file contains a lot of files in a compressed form.
This way the browser has to load less data and the applet will startup faster.

</APPLET>
This is the applet end tag


GAME DISCRIPTION:
You can use the keyboard or mouse.

KEYBOARD:
   spacebar = fire laser
   up arrow = fire laser
   s or S   = Toggles the sound siren
   arrows   = go left or right
   esc      = cancels the game

MOUSE:
   moves       = left and right
   left button = fire laser

NOTE : the mouse only works if it is over the applet.
NOTE : a mouse move overrides the keyboard move.

STORY :
The USS Enterprise is grounded on a planet.
The klingons have increased the gravity off this planet.
So the enterprise can't take off.
Your task is to shoot as many falling stars to survive.


FAQ:
Frequently asked questions

JAVA.LANG.APPLETSECURITY EXCEPTION
Some applet will not work if started locally with an Explorer 3.01 3.02 and 4.0 or Netscape 4 and higher.
But they will work if started from the net.
Its caused of some regid security restriction implemented by Microsoft and Netscape.
Later versions of Microsoft do not have this problem.

JAVA.LANG.CLASSNOTFOUND EXCEPTION
Most likely the applets class file is not there.
Did you upload all the files ?


BUGFIX:

1:
Two loops where discovered that could eat up too much resources.
Note:
That if the program doesn't respond it probalby doesn't have the focus.
Click on the applet to retain the focus.

2:
A possibility of a synchronization error was discovered.
It can be caused by a system (OS) repaint call.

3:
Netscape 6.0beta seems to have implemented the Sun Java runtime module version 1.3
This JRE does seem to have trouble with class files that where optimized with HashApplet0.8.
HashApplet 0.8 a freeware Java applet optimizer that I used for over three years.
Anyway the class files in this email are optimized with another program.
The disadvantage they are 40% bigger.
Hope they do fix the problem at Netscape side.

4:
Ms Explorer 5.x does have a major bug concerning applets.
There is a flow chart error in its Java Virtual Machine.
This causes the size of the applet to be sometimes unknown at the initialization method init().
This bug mostly appears when you hit the refresh button.
The applet then will throw an IllegalArgument exception at the Java console.
A workaround has been added to fix this problem.

For the technical minded.
CreateImage(int width, int height ) is used to draw the images in memory before they are displayed.
When finished a g.drawImage(offScreenImage,0,0,this) is done to display it.
This technique is called double buffering.
When width and height is 0 it createImage will throw an IllegalArgumentException.
I'm a little surprised that Microsoft hasn't fixed it jet.
Anyway a workaround has been added.

6:
Sometimes the stars did seem to hang at the top and didn't move anymore.
It has been fixed.
This applet was written at the beginning of 1996 when I was just starting to program.
Well I implemented a lot of bugs myself.
These only appeared with the newer browsers late 2000.

For the technical minded.
Some synchronization has been added to be sure the offscreenImage is painted before repaint is called again.
The solution actually was quite simple.
I did override repaint() and added a wait() statement.
Then at paint and update I added a notifyAll()
(Added the synchronized keywords at these methods off course.)
This fixed the problem.

6:
This applet is developt in 1989 during a week holiday
It was one of the first game applets developed by me
So it originates from a very old Java version.
Some parts of the programs where obsolete.
Meaning there is a change they will not be suported in the future.
That is why some methoeds are adjusted.
size() is replaced by getSize()
Thread.stop() in the aplets stop() method is replaced
The old Java 1.02 event handling system is replaced
Hopefully this versions lifecycle is now little bit longer


About JADS (=Java Applet Download Site)

At the old days it was located at http://www.nedernet.nl/~rvdb
But my provider has merged with another.
I received a message that the nedernet.nl domain will seas to exist at the end of 2000
My old email address rvdb@nedernet.nl should stay active.

Actually Comweb.nl is my own server and the domain comweb.nl is my property.
Currently I am only renting server place
You can reach me at sales@comweb.nl

Please note that I receive a lot of mail each day.
Besides this hobby/work I also have a full time job.
At the future I hope my hobby gets my full time job :-)

I would appreciate it if you would make a link to http://www.comweb.nl/
or http://www.comweb.nl
This way I do get some more traffic and my ranking at the search engines does increase.


Enjoy:
RJHM van den Bergh
sales@comweb.nl