We’re All Doomed is a piece of coursework which I completed as part of a group for the module Advanced Graphics and Games Programming in my third year of university. The aim of the coursework was to demonstrate our understanding of component based game engines, which we did in C# using the C# OpenGL port; OpenTK. We were given a very basic game engine which we were to optimise, and further build on by adding in new systems (ie, collision, audio), and then build a maze based game with it – I’d estimate the work was 65% game engine, and 35% on the actual game itself. The game was to be a first person shooter in a maze, and the task was to shoot and disable the drones.
This was a team project, which consisted of me and one other developer. I will break down the major contributions I made to the project below:
The Audio System is possibly my proudest contribution of the project. The Audio System uses the OpenAL library, and handles all aspects of audio. The system works with 3D audio, and ensures that it is up-to-date and accurate every frame. It works with 3 components: ComponentAudio, ComponentAudioListener and ComponentAudioSource. These are used to load audio, set the audio listener and to set the listener source respectively.
The system uses object pooling with audio sources in order to work efficiently, and also to allow multiple instances of the same audio exist and play concurrently. It ensures that when objects are destroyed, they don’t keep playing, and it frees up the object’s resources to other instances.
The map builder was an interesting part of the project to work on. The map builder class read in a premade map from a file, and would convert the bitmap image into a playable map, by instantiating the respective objects in the correct places. This class was a joint effort with the other team member – I was responsible for creating the base system, and got it to a state where it was being correctly generated. The other member worked to integrate his AI system with the map, and to add the spawning of other entities such as coins and the AI agents.
Creating the on-screen map was a relatively simple task. It read the data from the same data file as the Map Builder, and simply used the OpenGL provided functions to render shapes to the screen. It displays the current maze, every pickup, the player & the player’s direction, and the enemies and their respective positions and directions. In addition, when an enemy spots the player, the colour of its cone will change.
The rendering system wasn’t created by me; a basic rendering system was already present. However I worked to rewrite it (along with the shaders) to make it fit with our coding conventions, and also to make it more modular so as to work better with lighting.
This isn’t a conclusive list, rather just a pick of the most interesting parts of the project. In addition I also:
There were plenty of bug fixes – the other team member and I regularly fixed bugs with each others’ code, so we both got to work with most of the engine to some extent.
This coursework is one of my proudest pieces, and together me and the other member (Joshua Snape) were able to achieve 100%. A video of gameplay can be found here: https://www.youtube.com/watch?v=tT5XXhHDzEI