Pelin suorituskyvyn optimointi Unity Tinyn avulla
Pyykkö, Karri (2021)
Kandidaatintyö
Pyykkö, Karri
2021
School of Engineering Science, Tietotekniikka
Kaikki oikeudet pidätetään.
Julkaisun pysyvä osoite on
https://urn.fi/URN:NBN:fi-fe2021081843629
https://urn.fi/URN:NBN:fi-fe2021081843629
Tiivistelmä
Unity Tiny on Unityn 2018 loppupuolella julkaisema Unityn paketti, jonka tarkoituksena on ottaa täysi hyöty irti Unityn ECS (Entity-Component-System) arkkitehtuurista ja tarjota kehittäjälle työkaluja kyseisen arkkitehtuurin ja sen teknologioiden hyödyntämiseksi. Mainospuheessaan Unity lupaa Tinyn tuovan merkittäviä parannuksia pelimoottorin suorituskykyyn perinteiseen Unityyn ja sen oliokeskeisen arkkitehtuuriin verrattuna. Tämän työn tavoitteena on tutkia näiden väittämien paikkaansa pitävyyttä vertailukykyisten teknologiademojen ja suorituskyvyn mittauksen kautta. Työssä ei kuitenkaan suoriteta optimointia ohjelmakoodin kautta, vaan työssä keskitytään täysin itse paketin tuomiin muutoksiin suorituskyvyssä. Suorituskykyä arvioidaan kolmen suorituskyvyn kannalta oleellisen metriikan kautta, jotka ovat CPU:n (Central Processing Unit) vasteaika, GPU:n (Graphics Processing Unit) vasteaika ja muistin käyttöaste. Tutkimuksen tuloksien perusteella Unity Tiny ja DOTS (Data-Oriented Technology Stack) tuovat merkittäviä parannuksia suorituskykyyn erityisesti suurilla peliobjektien lukumäärillä. Kuitenkin ainakin toistaiseksi perinteinen Unity suoriutuu Tinya paremmin pienemmillä peliobjektien lukumäärillä. Selvistä tapauskohtaisista suorituskyvyn eduista huolimatta, Tiny on yhä hieman keskeneräinen ja kehittäjän tulisikin punnita paketin soveltuvuutta projektikohtaisesti käyttötarkoituksen mukaan. Unity Tiny is a package released by Unity in late 2018. The package’s purpose is to take full advantage of Unitys ECS (Entity-Component-System) architecture and to provide the developer with tools to take advantage of said architecture and technology. In their sales pitch Unity promises that Tiny will bring significant performance benefits for the game engine in comparison to the traditional Unity game engine. The purpose of this work is to compare the validity of these claims through building two comparable artefacts and gathering data on their performance. Instead of optimization of the program code, this work will be focusing on the direct performance benefits of the package itself. The performance is measured through three different core metrics, which are CPU (Central Processing Unit) response time, GPU (Graphics Processing Unit) response time, and memory utilization. Based on the results, Unity Tiny and DOTS (Data-Oriented Technology Stack) see a significant performance boost, especially with a high number of active game objects. On the contrary, at least for now, the traditional Unity performs better with a lower number of active game objects. Despite clear performance benefits, Tiny is still a little rough around the edges, which is why the developer should consider Tiny on a project to project basis.