Asteroids 2D Java Application
1. Description
Asteroids is a Java implementation of the old Atari game Asteroids.
It improves on the game by adding a computer opponent, and scrolling graphics.
The game illustrates many computer graphics concepts, including windowing
and viewports, and animation using rotation, rotation, translation, and
multiple images. The goal was not to create the best Asteroids game
out there, but instead to satisfy the requirements of the class in a projet
that was both fun and educational.
For educational purposes only, I've decided to make the source code
publicly available. The structure of the code is somewhat awkward
due to the submission requirements that the source code be in one file,
and due to the already awkward structure of the SRGP graphics library implementation
we had to work with.
2. Screen Shots
3. Disclaimer
THE ASTEROIDS 2D JAVA APPLICATION IS PROVIDED "AS IS" WITHOUT WARRANTY
OF ANY KIND. MARK ROTH DISCLAIMS ALL WARRANTIES, EITHER EXPRESSED
OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE. IN NO EVENT SHALL MARK ROTH BE LIABLE FOR ANY
DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL,
LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MARK ROTH HAS BEEN
ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW
THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL
DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.
4. Usage Instructions
4.1. System Requirements
To use the Asteroids 2D Java Application, you must have the following:
-
Java JDK or JRE 1.1.6 or later.
-
A Pentium 166 Mhz or faster is recommended. The game will run on
Solaris, but keys occasionally get stuck.
4.2. Download and Installation Instructions
To download the system, click on the following link, and uncompress the
zip file to any directory. Then, add this directory to your CLASSPATH.
4.3. Compilation Instructions
To compile the system, use JDK 1.1.6 or above and execute the following
command:
javac *.java
4.4. Execution Instructions
To execute, add to your CLASSPATH the directory you extracted the files
to (remember that the CLASSPATH is separated by colons ':' on UNIX systems
and by semi-colons ';' on Windows systems), and type:
java lab2
4.5. Execution Notes
You must execute this program on a system that is GUI-capable (i.e. under
UNIX, the system must have a DISPLAY). The Windows NT Microsoft JVM
(jview) actually seems to run asteroids a bit faster than Sun's JVM unless
you are using Sun's Hotspot(tm) JVM.
5. Final Notes
This program was created by Mark Roth, a student at the Rochester Institute
of Technology in Rochester, NY. If you have any questions, comments,
suggestions, or bug reports, please do not hesitate to contact me.
My contact information is as follows:
Mark Roth
Rochester Institute
of Technology
E-mail: markroth8@yahoo.com
Last Updated: December 21, 1999