Improving Mobile Game Performance with Basic Optimization Techniques in Unity
Abstract
:1. Introduction
2. Optimization Techniques
2.1. Low Poly Models
2.2. Merge Vertices
2.3. Textures and Materials
2.4. Occlusion Culling
2.5. Object Pooling
3. Methodology of the Study
- Frames per second (FPS);
- Batches;
- Triangles/polygons.
3.1. Frames per Second (FPS)
3.2. Batches
3.3. Triangles/Polygons
3.4. Profiling Tools
4. The Two Versions of the Game
5. Results
5.1. Loading Results on a Personal Computer
5.1.1. Loading Results CPU Usage
5.1.2. Loading Results on Rendering
5.1.3. Loading Results on Memory
5.2. Gameplay Results on a Personal Computer
5.2.1. Rendering Data
5.2.2. Memory Data
5.3. Gameplay on a Mobile Device
5.3.1. Optimized Game on the Mobile Device
5.3.2. Non-Optimized Game on the Mobile Device
6. Discussion and Conclusions
Author Contributions
Funding
Conflicts of Interest
References
- Chan, S. Mobile Game Revenue Finally Surpasses PC and Consoles Venture Beat. 2017. Available online: https://venturebeat.com/2017/07/13/mobile-game-revenue-finally-surpasses-pc-and-consoles/ (accessed on 17 January 2022).
- Chen, H.; Rong, W.; Ma, X.; Qu, Y.; Xiong, Z. An Extended Technology Acceptance Model for Mobile Social Gaming Service Popularity Analysis. Mob. Inf. Syst. 2017, 2017, 1–12. [Google Scholar] [CrossRef]
- Bhawar, P.; Ayer, N.; Sahasrabudhe, S. Methodology to create optimized 3D models using blender for Android devices. In Proceedings of the 2013 IEEE Fifth International Conference on Technology for Education (t4e 2013), Kharagpur, India, 18–20 December 2013; pp. 139–142. [Google Scholar]
- Trisnadoli, A.; Kreshna, J.A. Optimization of Educational Mobile Game Design ‘Ayo Wisata ke Riau’ based on User’s Perspective. IT J. Res. Dev. 2021, 6, 52–59. [Google Scholar] [CrossRef]
- Xanthopoulos, S.; Xinogalos, S. A review on location based services for mobile games. In Proceedings of the 20th Pan-Hellenic Conference on Informatics, Patras, Greece, 10–12 November 2016; pp. 1–6. [Google Scholar]
- Chehimi, F.; Coulton, P.; Edwards, R. Evolution of 3D mobile games development. Pers. Ubiquitous Comput. 2006, 12, 19–25. [Google Scholar] [CrossRef]
- Unity Technologies. Practical Guide to Optimization for Mobiles. 2020. Available online: https://docs.unity3d.com/2019.3/Documentation/Manual/MobileOptimizationPracticalGuide.html (accessed on 30 December 2021).
- Choi, Y.; Park, S.; Jeon, S.; Ha, R.; Cha, H. Optimizing Energy Consumption of Mobile Games. IEEE Trans. Mob. Comput. 2021. [Google Scholar] [CrossRef]
- Ng, K.W.; Yeap, Y.W.; Tan, Y.H.; Ghauth, K.I. Collision detection optimization on mobile device for shoot’em up game. In Proceedings of the 2012 International Conference on Computer & Information Science (ICCIS), Chongqing China, 17–19 August 2012; Volume 1, pp. 464–468. [Google Scholar]
- Kwon, D.; Yang, S.; Paek, Y.; Ko, K. Optimization techniques to enable execution offloading for 3D video games. Multimedia Tools Appl. 2016, 76, 11347–11360. [Google Scholar] [CrossRef]
- Hasan, R.; Chakraborti, S.; Hossain, Z.; Ahamed, T.; Abdul Hamid, M.; Mridha, M.F. Character and Mesh Optimization of Modern 3D Video Games. In Advances in Data and Information Sciences; Springer: Singapore, 2020; pp. 655–666. [Google Scholar]
- Christopoulou, Ε.; Xinogalos, S. Overview and Comparative Analysis of Game Engines for Desktop and Mobile Devices. Int. J. Serious Games 2017, 4, 21–36. [Google Scholar] [CrossRef] [Green Version]
- Deering, M.F. Sun Microsystems Inc. Estimating Graphics System Performance for Polygons. U.S. Patent 6,313, 838, 2021. [Google Scholar]
- Unity Technologies. Modeling Character for Optimal Performance. 2017. Available online: https://docs.unity3d.com/560/Documentation/Manual/ModelingOptimizedCharacters.html (accessed on 3 January 2021).
- Blender Documentation Team. Blender 2.80 Manua –Vertex Tools. Available online: https://docs.blender.org/manual/en/2.80/modeling/meshes/editing/vertices.html (accessed on 9 January 2021).
- One Wheel Studio. How to Use Color Palettes with Low Poly Models in Unity and Blender 2.8. 2019. Available online: https://www.youtube.com/watch?v=-9cuTjOBbiM&t=8s (accessed on 10 January 2021).
- Unity. 7 Ways to Optimize Your Unity Project with URP. 2020. Available online: https://www.youtube.com/watch?v=NFBr21V0zvU (accessed on 3 February 2021).
- 2020 Unity Technologies. Using Occlusion Culling with Dynamic GameObjects. 2018. Available online: https://docs.unity3d.com/Manual/occlusion-culling-dynamic-gameobjects.html (accessed on 3 February 2021).
- Wang, X. Game Design Patterns for CPU Performance Gain in Games. Bachelor Thesis, Faculty of Informatics, TU Wien, Vienna, Austria , 2016. [Google Scholar]
- Unity. Optimization tips for maximum performance–Part 1|Unite Now 2020. 2020. Available online: https://www.youtube.com/watch?v=ZRDHEqy2uPI (accessed on 20 December 2020).
- Unity. How to profile and optimize a game|Unite Now 2020. 13 July 2020. Available online: https://www.youtube.com/watch?v=epTPFamqkZo (accessed on 2 January 2021).
- Brunne, D. Frame Rate: A Beginner’s Guide TechSmith. Available online: https://www.techsmith.com/blog/frame-rate-beginners-guide/ (accessed on 3 January 2021).
- Claypool, M.; Claypool, K. Perspectives, frame rates and resolutions: it’s all in the game. In Proceedings of the 4th International Conference on Foundations of Digital Games, San Luis Obispo, CA, USA, 26–30 August 2009; pp. 42–49. [Google Scholar]
- Claypool, K.T.; Claypool, M. On frame rate and player performance in first person shooter games. Multimed. Syst. 2007, 13, 3–17. [Google Scholar] [CrossRef] [Green Version]
- Unity Technologies. Draw Call Batching. 2015. Available online: https://docs.unity3d.com/520/Documentation/Manual/DrawCallBatching.html (accessed on 3 January 2021).
- Zhang, A.; Chen, K.; Johan, H.; Erdt, M. High performance texture streaming and rendering of large textured 3d cities. In Proceedings of the 2020 International Conference on Cyberworlds (CW), 29 September–1 October 2020; pp. 17–24. [Google Scholar]
- Unity. Unite Europe 2016–Optimizing Mobile Applications. [Online video]. 13 July 2016. Available online: https://www.youtube.com/watch?v=j4YAY36xjwE&t=1446s&ab_channel=Unity (accessed on 2 January 2021).
- Unity Technologies. Rendering Profiler Module. 2021. Available online: https://docs.unity3d.com/2020.1/Documentation/Manual/ProfilerRendering.html (accessed on 10 December 2021).
- Unity Technologies. Memory Profiler Module. 2021. Available online: https://docs.unity3d.com/Manual/ProfilerMemory.html (accessed on 10 December 2021).
- Lehtola, A. Optimizing Unity Projects. Bachelor Thesis, Business Administration, Business Information Technology, Kajaanin Ammatikorkeakoulu University of Applied Sciences, Kajaani, Finland, 2018. [Google Scholar]
- Android Developer. Improve Your Game’s Performance. Available online: https://developer.android.com/games/optimize (accessed on 10 March 2022).
Model | Improved (Triangles) | Non-Improved (Triangles) |
---|---|---|
Barrack | 808 | 6584 |
Tree | 2190 | 5640 |
Water tank | 4400 | 6088 |
Sand | 2512 | 130,050 |
Enemy | 3296 | 25,585 |
Variables | Optimized Version | Non-Optimized Version |
---|---|---|
SetPass Calls | 49 | 57 |
Draw Calls | 103 | 109 |
Batches | 103 | 109 |
Triangles | 175.4 k | 734.8 k |
Vertices | 307.3 k | 656.4 k |
Used Textures | 13/3.3 MB | 25/3.4 MB |
Render Textures | 12/103.5 MB | 13/93.7 MB |
Render Textures Changes | 3 | 5 |
Used Buffer | 470/22.2 MB | 2013/38.3 MB |
Vertex Buffer Upload in Frame | 128/20.6 MB | 140/32.6 MB |
Index Buffer Upload in Frame | 114/1.3 MB | 126/3.2 MB |
Shadow Casters | 89 | 78 |
Variables | Optimized Version | Non-Optimized Version |
---|---|---|
Total Used Memory | 0.63 GB | 0.82 GB |
GC Used | 15.4 MB | 14.4 MB |
Gfx Used | 45.2 MB | 61.9 MB |
Audio Used | 1.9 MB | 1.9 MB |
Video Used | 264 B | 264 B |
Profiler (Used) | 375.1 MB | 0.53 GB |
Total Reserved Memory | 0.88 GB | 1.08 GB |
GC Reserved | 32.8 MB | 23.7 MB |
Gfx Reserved | 45.2 MB | 61.9 MB |
Audio Reserved | 1.9 MB | 1.9 MB |
Video Reserved | 264 B | 264 B |
Profiler (Reserved) | 391.0 MB | 0.55 GB |
System Used Memory | 1.51 GB | 1.68 GB |
Textures | 834/154.1 MB | 808/146.2 MB |
Meshes | 109/62.7 MB | 123/102.5 MB |
Materials | 110/234.7 MB | 102/245.8 KB |
Animation Clips | 29/5.5 MB | 35/8.5 MB |
Asset Count | 5992 | 6456 |
Game Object Count | 5413 | 450 |
Scene Object Count | 13761 | 1929 |
Object Count | 19753 | 8385 |
GC allocation in Frame | 6084/0.9 B | 3853/0.6 MB |
Variables | Optimized Version | Non-Optimized Version |
---|---|---|
Set Pass Calls | 60 | 65 |
Draw Calls | 227 | 248 |
Batches | 224 | 246 |
Triangles | 490.3 k | 3.5 M |
Vertices | 1.0 M | 4.8 M |
(Dynamic Batching) | ||
Batched Draw Calls | 9 | 5 |
Batches | 6 | 3 |
Triangles | 23.1 k | 23.2 k |
Vertices | 15.5 k | 15.7 k |
(End Dynamic Batching) | ||
Used Textures | 18/3.5 MB | 30/4.7 MB |
Render Textures | 12/103.7 MB | 13/103.7 MB |
Render Textures Changes | 2 | 3 |
Used Buffer | 5213/37.2 MB | 12542/95.4 MB |
Vertex Buffer Upload in Frame | 5/367.7 KB | 5/374.1 KB |
Index Buffer Upload in Frame | 3/135.2 KB | 4/135.6 KB |
Shadow Casters | 253 | 263 |
Variables | Optimized Version | Non-Optimized Version |
---|---|---|
Set Pass Calls | 67 | 70 |
Draw Calls | 253 | 260 |
Batches | 249 | 253 |
Triangles | 574.7 k | 3.4 M |
Vertices | 1.2 M | 4.8 M |
(Dynamic Batching) | ||
Batched Draw Calls | 11 | 13 |
Batches | 7 | 6 |
Triangles | 41.5 k | 38.6 k |
Vertices | 27.9 k | 26.1 k |
(End Dynamic Batching) | ||
Used Textures | 18/3.5 MB | 28/3.5 MB |
Render Textures | 12/103.7 MB | 13/103.7 MB |
Render Textures Changes | 2 | 3 |
Used Buffer | 4933/37.3 MB | 12522/93.3 MB |
Vertex Buffer Upload in Frame | 5/367.7 KB | 5/374.1 KB |
Index Buffer Upload in Frame | 5/0.6 MB | 4/0.6 MB |
Shadow Casters | 266 | 262 |
Variables | Optimized Version | Non-Optimized Version |
---|---|---|
Total Used Memory | 0.93 GB | 0.99 GB |
GC Used | 19.0 MB | 17.2 MB |
Gfx Used | 66.1 MB | 128.5 MB |
Audio Used | 2.9 MB | 2.8 MB |
Video Used | 264 B | 264 B |
Profiler (Used) | 0.61 GB | 0.58 GB |
Total Reserved Memory | 1.16 GB | 1.23 GB |
GC Reserved | 24.6 MB | 24.4 MB |
Gfx Reserved | 66.1 MB | 128.5 MB |
Audio Reserved | 2.9 MB | 2.8 MB |
Video Reserved | 264 B | 264 B |
Profiler (Reserved) | 0.63 GB | 0.60 GB |
System Used Memory | 1.81 GB | 1.98 GB |
Textures | 878/166.3 MB | 922/175.1 MB |
Meshes | 107/62.7 MB | 133/104.2 MB |
Materials | 103/234.7 MB | 196/251.1 KB |
Animation Clips | 29/5.5 MB | 35/8.5 MB |
Asset Count | 5923 | 6464 |
Game Object Count | 5458 | 2097 |
Scene Object Count | 14,006 | 5585 |
Object Count | 19,929 | 12,049 |
GC Allocation in Frame | 9/506 B | 6/384 B |
Variables | Optimized Version | Non-Optimized Version |
---|---|---|
Total Used Memory | 0.85 GB | 1.00 GB |
GC Used | 16.4 MB | 17.7 MB |
Gfx Used | 66.1 MB | 126.4 MB |
Audio Used | 2.9 MB | 2.8 MB |
Video Used | 264 B | 264 B |
Profiler (Used) | 0.58 GB | 0.59 GB |
Total Reserved Memory | 1.15 GB | 1.24 GB |
GC Reserved | 24.6 MB | 24.4 MB |
Gfx Reserved | 66.1 MB | 126.4 MB |
Audio Reserved | 2.9 MB | 2.8 MB |
Video Reserved | 264 B | 264 B |
Profiler (Reserved) | 0.61 GB | 0.62 GB |
System Used Memory | 1.80 GB | 1.99 GB |
Textures | 878/166.3 MB | 922/175.1 MB |
Meshes | 107/62.7 MB | 133/104.2 MB |
Materials | 103/234.7 MB | 106/251.1 KB |
Animation Clips | 29/5.5 MB | 35/8.5 MB |
Asset Count | 5923 | 6464 |
Game Object Count | 5465 | 2105 |
Scene Object Count | 14032 | 5629 |
Object Count | 19955 | 12093 |
GC allocation in Frame | 199/57.3 KB | 7/424 KB |
Xiaomi Mi Note 10 Lite Specifications | |
---|---|
CPU | Qualcomm SDM730 Snapdragon Octa-core MAX 2.2 GHz |
RAM | 6 GB |
Storage | 64 GB |
Display | 6.47 inches |
Batter | Li-Po 5260 mAh |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Koulaxidis, G.; Xinogalos, S. Improving Mobile Game Performance with Basic Optimization Techniques in Unity. Modelling 2022, 3, 201-223. https://doi.org/10.3390/modelling3020014
Koulaxidis G, Xinogalos S. Improving Mobile Game Performance with Basic Optimization Techniques in Unity. Modelling. 2022; 3(2):201-223. https://doi.org/10.3390/modelling3020014
Chicago/Turabian StyleKoulaxidis, Georgios, and Stelios Xinogalos. 2022. "Improving Mobile Game Performance with Basic Optimization Techniques in Unity" Modelling 3, no. 2: 201-223. https://doi.org/10.3390/modelling3020014
APA StyleKoulaxidis, G., & Xinogalos, S. (2022). Improving Mobile Game Performance with Basic Optimization Techniques in Unity. Modelling, 3(2), 201-223. https://doi.org/10.3390/modelling3020014