Optimization for bullet hell games
Saari, Mikko (2025)
Julkaisun pysyvä osoite on
https://urn.fi/URN:NBN:fi:amk-2025060921885
https://urn.fi/URN:NBN:fi:amk-2025060921885
Tiivistelmä
The purpose of this thesis was to investigate and test different solutions for improving the performance of games involving the creation and management of large number of game objects. While the thesis focuses on the genre of bullet hell games and the use of Unity game engine as its frame of reference, some of its contents can be applied into other game genres and game engines as well.
The topic was approached through study of learning materials and documentation of three different optimization design patterns: object pooling, multithreading with Unity’s Job system and data-oriented Entity Component System. The findings from the theoretical part were then used for the development of test scene using the design patterns to further deepen the understanding. The limitations and challenges as well as their solutions uncovered while developing the test scenario were documented. The effectiveness of the design patterns in comparison to unoptimized version was also estimated by gathering performance data of using test runs that were comparable with each other.
Based on the results of the practical testing it was decided that combination of Entity Component System with unoptimized game objects would both solve the performance issues while being the easiest to develop. Object pooling did not show any gains in performance during testing and added complexity to objects lifecycle made debugging problems challenging. Job system was skipped over during the development of the test scene due to findings done during theoretical research.
Use of Job system in combination with Entity Component System stays as an open possibility in future if further optimization is necessary. Furthermore, as Unity is continuing the development of Entity Component System, its limitations and implementation are open for major changes within future versions of Unity game engine.
The topic was approached through study of learning materials and documentation of three different optimization design patterns: object pooling, multithreading with Unity’s Job system and data-oriented Entity Component System. The findings from the theoretical part were then used for the development of test scene using the design patterns to further deepen the understanding. The limitations and challenges as well as their solutions uncovered while developing the test scenario were documented. The effectiveness of the design patterns in comparison to unoptimized version was also estimated by gathering performance data of using test runs that were comparable with each other.
Based on the results of the practical testing it was decided that combination of Entity Component System with unoptimized game objects would both solve the performance issues while being the easiest to develop. Object pooling did not show any gains in performance during testing and added complexity to objects lifecycle made debugging problems challenging. Job system was skipped over during the development of the test scene due to findings done during theoretical research.
Use of Job system in combination with Entity Component System stays as an open possibility in future if further optimization is necessary. Furthermore, as Unity is continuing the development of Entity Component System, its limitations and implementation are open for major changes within future versions of Unity game engine.