Space Bacon

Junior Project
Team: Wafflesauce

Download coming soon!

Space Bacon was the third team game I've made during my stay at Digipen. It's a team-based space shooter using a variation of capture the flag called "steal the bacon." Instead of one flag at each team's base, there are multiple flags littered around the center of the map. The object of the game is still the same; take the flags back to your base while preventing the other team from doing the same. The game ended up becoming a chaotic free-for-all deathmatch, with many players just trying to destroy each other. From the playtests we found that it was quite the enjoyable experience for most of the players.

While this project was not the first time I'd worked with DirectX, it was the first time I'd made an entire graphics engine from the ground up. Thankfully, I was able to get much help from the school's graphics club which helped me get something that could be worked with quickly and cleanly.

My responsibilities on this project was to implement all graphics related systems. I thus created the loaders and managers for the models, textures, UI, shaders and materials used in the game. I also implemented hardware instancing for the particles and models used as well as a spring-based 3rd person camera.

Graphics Content Loaders/Managers
All of the graphics content in our game was loaded using a materials file system. Each model had an associated material which specified any custom properties for how the user might want the model to draw. Each subset of the model could be drawn with different parameters and even different shaders could be used individual subsets. Each material was saved using DirectX parameter blocks, allowing all data to be set without dozens of checks for each type of parameter.

Model/Particle Hardware Instancing
After a presentation done in class, I decided to look into hardware instancing as a means to eliminate the framerate drop caused by the addition of the hundreds of models that made up our game's play field. As the presentation was on particles, I first implemented a particle engine that used DirectX hardware instancing for drawing many particle systems at once, using DirectX's stream sources. In addition, I used used a texture atlas to group multiple particle textures and eliminate the need for seperation by texture. Once I'd finished implementing this, it didn't take too long to apply hardware instancing to the models, giving our framerate a much needed boost.

3rd Person Spring Camera
The camera used by a 3rd person flying game needs to be flexible and smooth. We realized very early on that a rigid camera that stuck behind the player wasn't going to cut it. Using an XNA sample as a guide, I was able to create a very natural camera by treating the player and camera as mass points on the ends of a spring. With a bit of tweaking, the final result was one that many players liked.