XNA Projects

Project Cobalt

A game about spaceships and giant magnets.

Creation

Project Cobalt was a class assignment for my Computer Science 3 class. The goal was to work in groups of four create a 2D game in a ten week time span using C#. Our game was a top down space shooter about magnetism. A player would fly through a level defeating enemies in order to progress to the next level. Players would use their magnetic tractor beam to destroy enemies. The purpose of the tractor beam was to catch magnetised projectiles and either fire them back at an enemy or use them as a shield to block incoming shots. With the exception of the player ship, every object in the game had a polarity that meant it could be affected by magnetism. Every planet, enemy and projectile had an effect on the movement of the things around it.


My Role

Because it was possible to have hundreds of objects on screen at one time, I had to figure out a way to optimize our code. I eventually wrote a quad tree to do spatial partitioning. Because we were no longer doing n-squared computations for collisions, our game's performance improved drastically. In later months, we also found out that our polygon count was through the roof. The team member who created the art assets had made each projectile a 6000 polygon sphere. After lowering the poly count dramatically the games performance increased greatly again.

Images

Project Cobalt