Skip to content

aGreenCat/SuperNova

Repository files navigation

SuperNova

  • Course: CSCI 395.41 Basics of Game Engines
  • Professor: Pavel Shostak
  • Author: Tedd Lee

Overview

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.

Game Mechanics & Rules

  • 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.

Game Demo

Watch the video

Unique Aspects

1. Multi-body physics simulation (Newtonian).

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.

2. Custom fragment shader for stars.

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.

3. Seamless parallax background.

The background is tiled using a space texture and follows the motion of the player star to achieve a parallax effect.

4. Input wrapper class.

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.

Credits

Assets used in game are from:

About

A game created with custom game engine written in C++, for CSCI 39541: Basics of Game Engines.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages