Asteroid Field

  Description: This game demonstrates deferred lighting techniques. By using multi-pass renderring, we are able to attain a higher framerate with many lighting sources.

 We can see here that several light sources can be in play at one time, each illuminating a separate part of the scene. We also see how each separate light source adds a separate amount of illumination power to the final product.

 Here we see that not only do the projectiles illuminate asteroids, but also each other.

 An up close of the asteroid and its texture.

  Core Mechanics:

Flight Sim Camera: By using quaternion mathematics, we are able to obtain a camera that immerses the player in the game, providing 360 degree seamless rotation.

Collision Detection: Wrapping our shapes in spherical collision boxes allows for player-world interaction. Projectiles can hit and destroy asteroids, and the player colliding with an asteroid will halt motion.

World Generation: Using a randomization algorithm, each experience playing is different, with new asteroid fields. Utilizing space partitioning, we are able to increase efficiency 26x, by only checking for collisions in the player's immediate vicinity.


Much of the code for shapes/programs was pulled from previous assignments. Collisions and world generation were all written by me. Most references for code for deferred shading were obtained from ogldev. Github: found here