Rocks in Space!

IF YOU WERE USING JAVA YOU COULD PLAY ASTEROIDS NOW!


Instruction:
Overview
This game is loosely based on the Asteroids arcade game: Shoot everything that moves. Beware of the UFOs. They shoot back!
Large rocks will break up into several smaller rocks when shot. The smaller rocks are likely to move faster, so be ready to shoot them when they come screaming at you. Small rocks will disintegrate when shot; the debris is harmless.

Scoring
You get 200 points for shooting UFOs. The number of points you get for shooting a rock depends on their size. The smaller the rock, the more points you get for shooting it.
You get an extra ship every 1000 points.

Key bindings
key function
a     Turn left
sTurn right
SpaceThrust
Enter/ReturnFire

Known bugs
  • Collision detection between your ship and UFOs doesn't work.
  • Sometimes collision detection between your ship and a rock doesn't work.
  • It is possible to get killed immediately after appearing.
  • The warping between levels is cheesy!
  • Scrolling this page caused update problems in the game. (The slower the machine, the worse it gets...)
  • Key bindings may appear awkward. (Less so for xpilot players... Stupid AWT doesn't get notified when SHIFT is pressed!)

  • Features planned for next version
  • All know bugs fixed! :-)
  • Sound effects (But only after Netscape has changed their browser to release the audio device!)
  • Neat warping affect
  • Other enemies and objects
  • High score database
  • Code cleanup (more object oriented stuff)

  • Features thought about/suggested
  • Multi player support (Can you say 'Xpilot'?)

  • Internals
    For those interested in the way this applet works, here are some things that make it work on even slow machines:
  • Very few threads are used. This kinda goes against the ideas of threaded applications but the problem with many threads seems to be resource allocation and deallocation. Each UFO has a thread to determine when it should shoot and when it should change direction. All other time related events are done with a single Timer thread.
  • No double buffering is used. All animation is done by erasing the old object and drawing the new one. There are few enough objects on the screen to make this work well. Double buffering would push a lot of pixels to the screen that don't change between frames.
    The downside of this is that the game will get slower when more objects need to be drawn.
  • No images are used. All objects are either polygons or text.
  • License
    This applet and it's source are released under the Gnu Public License.

    Please send comments, bug reports, suggestions, etc. to andrew@sdsu.edu

    Source
    Andrew Scherpbier <andrew@sdsu.edu>
    Last modified: Thu Jan 4 11:24:30 PST 1996