Overview
A COMP127, Object Oriented Programming in Java, final course project.
We reimagined the classic Space Invaders into a solar system-themed adventure. Upon starting the game, the player is greeted with audio feedback that provides the storyline and instruction. The mission is to shoot down the sun, positioned at the center, while evading enemy solar flares. The orbiting planets pose an additional challenge; hitting them causes the lasers to reflect back. The player must avoid hitting Earth, as it will cost a life and there are only three lives to complete the mission successfully.
(See image on the right for the start screen and below for the game interface.)
Technical Implementation
By using object-oriented programming concepts such as inheritance, polymorphism, and encapsulation, we were able to significantly elevate our project. Inheritance was implemented to extend the Earth and Sun from the Planet class, facilitating the reuse of shared structures, behaviors, and attributes. Polymorphism allowed us to iterate through each planet in the solar system efficiently. Then, encapsulation was used to manage mathematical formulas and game elements which maintained a clean and organized code.How to Play
- Keep your ears open for the amazing storyline and start the mission!
- Control the spaceship along the bottom of the screen with your mousepad or left/right arrow keys.
- To shoot the lasers press the spacebar or click your mousepad/mouse.
- Avoid the sun flares and hitting the earth! Also watch out for lasers reflecting off the planets. These can cost you a life!
- Shoot the sun down until it disappears! And you complete the mission!
Limitations
A fundamental design limitation is that when there are too many lasers on the canvas at one time, it can lead to lagging in the game-play processing. This is a result from a dense and complicatedcanvas.animte
method which consists of multiple if-statements and loops. Possible lagging may occur during game-play every few seconds or so as well.
This project aims to be inclusive for the majority of the population. Solar Exodus includes the following limitations in accesibility:
- Players of younger age or those who lack hand-eye coordination may find it more difficult to play and complete the mission.
- A person who uses an assistive device or has physical disabilities may also find it quite difficult to play the game. Those with visual impairment will be unable to interact with the visual elments of the game.