Data-oriented Design approach for processor intensive games
MetadataShow full item record
The gap between processor and memory speeds have motivated for an alternative method for software development with focus on data and efficient use of memory, data-oriented design. The primary objective of this design is to utilize the slower memory units in a more efficient way through less cache-misses. Thefocus is solely on the data in an application and the way they are stored in memory. This design will be compared against the popular programming paradigm, object-oriented programming, to analyze whether a memory-focused application will perform better. This thesis will primarily focus on processor intensive applications where the processor must continuously write and read data from the memory units. This type of application is most commonly found with real-time applications such as video-games, which will be the main focus area for this thesis. This thesis will present three different applications that will be used to compare the two different programming paradigms,with the goal of comparing which implementation performs better. The first application will involve the implementation of an architectural pattern, the entity-component-system, which can be combined with data-oriented principles to create more processor efficient applications. The second application will involve a simulation implemented in Unity with data-oriented design. The final part will involve conversion of an existing video-game that is object-oriented, into a more data-oriented solution. A pure data-oriented solution was not achieved for the conversion due to limitations imposed by the data-oriented features in the game engine, as a result of the engine being in experimental stage. The results indicate that the data-oriented design performs better in cases where the processor must perform work on a large set of data. The design is more optimized for applications that require same type of work on large data sets as this allows for better spatial locality. Furthermore, the use of data-oriented principles allows for well established separation between data and logic, making it easier to introduce new type of logic and data into an application. However, the results gathered can not be completely attributed to the underlying design, as there are external factors impacting performance due to the development environments used.