|Failed to load latest commit information.|
Asteroids! - a Java asteroids implementation in OpenGL for Dave Straayer's CS142 class. Design: 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. Classes: 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.