- Course: CSCI 395.41 Basics of Game Engines
- Professor: Pavel Shostak
- Author: Tedd Lee
SuperNova is a 2D space simulation game written in C++ and built on the custom Nova game engine, which was built in class. The game simulates gravitational forces between celestial bodies, namely stars. The player is in control of a star, and uses the arrow keys to navigate a randomly generated system of stars. As stars move across space, they may collide with one another. The larger star engulfs the smaller one and grows in mass. The player's goal is to grow the mass of its star, trying to reach a large enough mass to go SuperNova.
- Apply vertical and horizontal forces to your star using the arrow keys (it may be a bit difficult to control).
- When two stars collide, the larger star steals the mass of the smaller star.
- The larger the mass of the star, the larger it appears. The color of the star is based on its mass (red -> orange -> yellow -> blue-white -> blue -> purple).
- Your star may not leave the game window.
Each body in the system applies a gravitational force on one another. Forces are calculated, and velocity and positions are updated accordingly. Collisions also conserve mass and momentum.
A special fragment shader allows stars to change colors based on mass while using the same texture. The fragment shader also supports an opacity parameter.
The background is tiled using a space texture and follows the motion of the player star to achieve a parallax effect.
The Nova input callback interface was not intuitive to use, and also had an awkward delay between press and repeat. An input class was introduced to abstract this further.
Assets used in game are from:
