Blog

Reducing the memory used from ~200 mb to ~150 mb; increasing the speed by ~0.5ms on Game Thread

Check out how we reduced the memory used from ~200 mb to ~150 mb and increased the speed by ~0.5ms on Game Thread.

Case: Brigada Games ported the game, which was originally developed for PC/Console to Switch. This allowed a developer and a publisher to access a new audience for their game.

The optimization was carried out on the Switch.

The main objective of optimization within the game involved minimizing both memory usage and GPU processing time.

During the development and optimization of the game, we faced several technical constraints and challenges. One significant hurdle was evaluating the complexity of collisions due to the diverse range of shapes and sizes present in the multitude of SM elements. It required meticulous visual assessment to effectively address this issue.

To optimize the game, we utilized Visual assessment to evaluate the similarity of appearance and shapes, along with PVD to visualize all potential collisions. Additionally, we employed simplified collisions instead of Triangles Complex Collision to compute physics. By implementing a less intricate mathematical model for miscalculations and reducing the number of triangles, we achieved a decrease in memory usage.

We have improved memory usage by utilizing stat LLM and tracking the number of objects in the physical world using PVD. By simplifying collision, we have reduced memory consumption and GPU timing without significantly impacting calculations in the physical world. As a result, we were able to allocate the freed memory to more important areas, leading to an increase FPS.

To ensure the game's quality, we perform testing and debugging tasks by assigning QA with providing screenshots, videos of repeatable gameplay, and stat memory and memory dumps.

Although simplified collision is more efficient, it cannot be used on all objects. We had to retain triangle complex collision on certain assemblies. This optimization process takes a considerable amount of time to determine the need for triangle complex collision. However, in the end, it greatly enhances overall game performance. Considering the cost of effort associated with optimizing for the Switch platform, such gains are significant.