Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Branch: master

Merge pull request #1 from jtwedt/master

cleaning up punctuation; testing pull requests
latest commit f09e41b5aa
@dlundquist authored
Failed to load latest commit information.
.settings Initial import
data switched bandit and player ship sprites
lib We can play MP3s, but I am not sure how to give them sexy syntax sugar
.classpath Add the JLayer library in lib/ to the project rather than JLayer in t…
.gitignore Adding bin to ignore
.project Initial import
Asteroids.docx Documentation
INSTALL factored out the install portion of README into INSTALL
Makefile Fix make file to build all classes and create bin directory as needed
README minor punctuation changes


Asteroids! - a Java asteroids implementation in OpenGL for Dave Straayer's
            CS142 class.

Since there are a limited number of students with OpenGL experience, we have
kept all the OpenGL related code in two classes ScenePanel and Sprite.  We used
two other advanced concepts that we have not yet covered in class to keep the
code uncluttered. All the game entities (asteroids, the player's ship, bullets,
etc.) inherit from the Actor base class, and we store all the actors currently
in the game in a Vector so we can have a single code path to update, render,
and handle collision detection for all entities currently in play.

    Asteroids - contains static methods for the game logic
    Vector - Provides simple 2D vectors used for position and velocity.
    GUI - Provides the GUI window.
    ScenePanel - Provides the OpenGL canvas to display the game.
    Sprite - Provides a class that uses OpenGL textures as sprites for each
            game entity. It includes a number of static methods to
            load all the required textures and provide textures for
            each type of entity.
    Actor - the base class for game entities that will move around and be
            drawn on the screen. The following classes inherit
            from this class.
        Asteroid - the Asteroids in the game
        PlayerShip - the player's ship
        Bullet - a projectile shot by the player's ship.
        PowerUp - See Below
        Particle - See Below
    InputHandler - Handles Keyboard inputs.
    SoundEffect - Manages Sounds. E.G. SoundEffect.forPlayerDeath().play();
    Sound - Plays a wav or mp3 file in a new separate thread.
    ParticleSystem - Manages the particles in the game.
        Particle - While it is an Actor, its stored in the ParticleSystem.particles
                   Vector. This keeps them from being collision detected.
            FireParticle - A Particle class to simulate fire. Specifically player thrust.
            DebrisPartic - A Particle class to simulate asteroid debris
    Weapon - Class for the Weapon of the PlayerShip. Weapons implement shoot();
        BasicWeapon - The weapon that the player starts with. Shoots 1 shot at a time
        TripleShotWeapon - A player weapon that shoots 3 shots at a time.
    PowerUp - An Actor that represents a power up that the player can get by running over.
        TripleShotPowerUp - Replaces the player's ship's weapon with a TripleShotWeapon.
Something went wrong with that request. Please try again.