Master Thesis
Total Page:16
File Type:pdf, Size:1020Kb
Faculty of Computer Science and Management Field of study: COMPUTER SCIENCE Specialty: COMPUTER ENGEENERING Master Thesis METHODS FOR IMPLEMENTING GAMES BASE ON REAL MAP DATA Sarper TEMEL keywords: Unity 3D Real-Location Based Games Real World Environment short summary: Implementing the real map data into the Unity Game Engine with possible methods and testing with Windows Graphics APIs which are supported by Unity. Supervisor Dr.inż.Marek.Kopel............................ ............................ ……………………. Title/ degree/ name and surname grade signature The final evaluation of the thesis Przewodniczący Komisji ...................................................... ............................ ……………………. egzaminu Title/ degree/ name and surname grade signature dyplomowego For the purposes of archival thesis qualified to: * a) Category A (perpetual files) b) Category BE 50 (subject to expertise after 50 years) * Delete as appropriate stamp of the faculty Wrocław 2019 1 ABSTRACT Game technology is a big part of our lives. Nowadays, the new tradition is the transfer of the real-world environment to the game engine and making games in this way. It's not just about games. The user can use this technology for their own benefit. For example, users can discover new places they can't go or experience the real world on other major technology AR and VR, every day the emergence of new methods that will lead to the concentration of game programmers in this area. The aim of this master thesis is to transfer methods to the game engine in 3D using real map data and to work on four different Windows graphics APIs to test and compare CPU, GPU and FPS performance. This will allow the user to observe which API is more successful. These APIs are: DirectX 11, DirectX12, Vulkan and OpenGL 4.5. The Unity will be the engine used. Test results will be collected using the official Unity Engine tools. STRESZCZENIE Technologia gier stanowi dużą część naszego życia. Obecnie nową tradycją stało się przeniesienie środowiska świata rzeczywistego do silnika gry i tworzenie gier w ten sposób. Nie chodzi tylko o gry. Użytkownik może korzystać z tej technologii dla własnej korzyści. Użytkownicy mogą na przykład odkrywać nowe miejsca, których w przeicwnym razie nie mogli by odwiedzić, za pomocą technologii AR i VR, każdego dnia pojawienie się nowych metod doprowadzi do koncentracji programistów gier w tej dziedzinie. Celem tej pracy magisterskiej jest przeniesienie metod do silnika gry w 3D, używając danych o istniejących lokalizacjach oraz praca na czterech różnych grafikach API w systemie operacyjnym Windows, a także przeprowadzenie testu oraz porównanie CPU, GPU i FPS. Pozwoli to użytkownikowi obserwować, które API jest bardziej skuteczne. Te API to: DirectX 11, DirectX12, Vulcan i OpenGL 4.5. Zasosowany silnik to Unity. Wyniki testów będą zbierane przy użyciu oficjalnych narzędzi Unity Engine. 2 CONTENTS ABSTRACT .......................................................................................................... 2 1. INTRODUCTION ......................................................................................... 5 1.1. Location-based Games ............................................................................... 5 2. RESEARCH BACKGROUND ..................................................................... 6 2.1. Unity Game Engine ................................................................................... 6 2.1.1. Introduction of Unity.............................................................................. 6 2.1.2. Frame Debugger ..................................................................................... 7 2.1.3. Profiler Tool ........................................................................................... 8 2.2. CPU and GPU Optimization in 3D Gaming Platform ............................... 8 2.2.1. CPU Optimization in 3D Gaming Platform ........................................... 9 2.2.2. GPU Optimization in 3D Gaming Platform ........................................... 9 2.3. Frame Per Second (FPS) ............................................................................ 9 2.4. Graphics APIs for Windows .................................................................... 10 2.5. Lighting Performance .............................................................................. 10 2.5.1. Realtime Lighting................................................................................. 10 2.5.2. Precomputed Realtime GI Lighting ..................................................... 11 2.5.3. Type of Lights ...................................................................................... 12 2.6. Shadows in Unity ..................................................................................... 13 2.7. OpenStreetMap ........................................................................................ 15 3. METHODS .................................................................................................. 17 3.1. ActionStreetMap ...................................................................................... 17 3.2. Map-Ity .................................................................................................... 17 3.3. GO Map 3D Map ..................................................................................... 19 3.4. Real World Terrain .................................................................................. 21 3.5. Mantle Environment System ................................................................... 22 3.6. Google Maps Platform Unity SDK .......................................................... 23 3.7. Wrld3d Map ............................................................................................. 25 3.8. Mapbox SDK ........................................................................................... 30 4. TEST ENVIRONMENT AND CONFIGURATIONS ............................... 35 4.1. Test Environment ..................................................................................... 35 4.2. Quality Settings Details ........................................................................... 35 5. TEST RESULTS ......................................................................................... 37 5.1. Frame Per Second (FPS) Benchmark ...................................................... 37 3 5.2. CPU Benchmark ...................................................................................... 39 5.3. GPU Benchmark ...................................................................................... 42 6. DISCUSSION ............................................................................................. 47 7. CONCLUSION ........................................................................................... 49 7.1. Future Work ............................................................................................. 49 8. BIBLIOGRAPHY ....................................................................................... 50 8.1. Figure References .................................................................................... 52 4 1. INTRODUCTION The rapid increase of data sources nowadays produces a massive map data that needs to be managed. A few decades before, companies start to implement real world environment into the different platforms. Many foundations take a part of the implementing real map data. Such as Google, Tomtom, Micello, Zenrin, DataCom. Unity is so much more than just a game engine. From the user-friendly editor, to the flexibility of C# scripting, powerful and useful applications can be created within a fraction of the time. Unity has now incorporated many methods and tools into engine by collaborating with many companies. However, some of these tools and methods were developed by Unity and some of them by other companies. The game industry is increasing day by day and users would like to gain more experience about real world environment in the games. Based on this idea, companies started spend more time about developing games considering with this idea. Especially, location-based games are becoming more popular and many methods come to exist. Moreover, real time location-based games with AR and VR can be considered. Google has been published new product which is call “Google Glass”. Also, Facebook published “Oculus VR”. The purpose of the research is to transfer the real world to the game environment through different implementation methods. The real location based themed games can be run on different platforms. Therefore, each method was tested on four different APIs. The purpose of testing on different APIs is that each API has a different level of processor consumption and FPS performance. The graphics details of the game content and fluency of the scenes in the game are the most important criteria. Obviously, real-world themed games cause more CPU consumption. Therefore, at the end of the research, the reader will learn which method performs better on which API and how to make the scene content more efficient and richer. 1.1. Location-based Games Nowadays, computers and smartphones have become more popular and people wants to experience real world in the games. Location-based game is a type of game which uses the player’s location. Recently, location-based games are played publicly and have become a common type of game for people. GPS technology is used for tracking the player’s current location. For instance, the game Pokémon GO and this type of games have popularisation is