Debuging and Optimization

I had a major role on the profiling and debugging of the game. I frequently tested it to find bugs and report/solve them.

Additionally, when I had a break from coding, I check for performance issues while testing and I registered anomalies on the CPU times. Furthermore, I tend to inform to the programmer of that part and search for better alternatives to the ones used.

Some of the Optimizations I implemented to lessen the CPU load or avoid loading times were:


Particle System on GPU

At the end of the project, while doing profiling, I took notice that the particle system was taking more than 20% of the CPU time. For that reason, I decided to look at the system, to port it to the GPU.

To acomplish my goal, I grouped the emitters of the same particles in a buffer and use two buffers to add the particles and checked when they die. Also, I replicated the behaviour of the system on a compute shader. The biggest problem for the system was to find a pseudo-random algorithm for the GPU.


GPU Culling

At the start of the project, we had a ton of static objects that were managed by the CPU. Of course, the culling of those objects was handled by it, which increased it's load immensely.

After some consideration, I decided to move the static objects from CPU to GPU. Due to the nature of the operations, a hardware designed to perform the same operation multiple times at once is ideal for the task.


Multithreaded loading System

At some point in the project, we toyed with the idea of making the game longer and, at that time, we had performance issues. After some thought, we decided to implement and test a multithreaded loading system, that used another thread to load parts of the map, allowing the game to continue running while loading.

Later on the project, we scrap the idea of making the map bigger and, instead, polish the design as much as we could, which left the system unused.