
FAKULTÄT FÜR INFORMATIK DER TECHNISCHEN UNIVERSITÄT MÜNCHEN Bachelorarbeit in Informatik Implementation of a cross-platform strategy multiplayer game based on Unity3D Igor Galochkin 2 FAKULTÄT FÜR INFORMATIK DER TECHNISCHEN UNIVERSITÄT MÜNCHEN Bachelorarbeit in Informatik Implementation of a cross-platform strategy multiplayer game based on Unity3D Entwicklung eines plattformunabhängigen Strategiespiels mit Unity3D Author: Igor Galochkin Supervisor: Prof. Dr. Uwe Baumgarten Advisor: Nils T. Kannengießer, M.Sc. Date: January 15, 2013 3 I assure the single handed composition of this bachelor thesis only supported by declared resources. Munich, 10th of January, 2013 Igor Galochkin 4 Abstract The thesis describes development of a multiplayer real-time strategy game "Fantasy Arena" for a range of operating systems and devices with focus on Android- and iOS- powered smartphones and tablets. The game uses Unity3D 4.x Pro game engine. The goal of the project was to provide a playable technical demo implementing the main features of the game. The thesis consists of 3 chapters. The first chapter provides background information about games development with focus on real-time strategy games and mobile games. The second chapter describes the design of the "Fantasy Arena" game, moving from a description of the game and explanation of game design choices to the listing of elicited requirements and constraints. The third chapter describes the game's implementation, starting with overall system design, then covering some interesting or technically challenging features, and ending with testing techniques. The thesis concludes with a look back at the project's planned and actual timelines, an evaluation of the project's results and an outlook. 5 6 Table of Contents ABSTRACT ........................................................................................................................................................... 5 TABLE OF CONTENTS ...................................................................................................................................... 7 INTRODUCTION ................................................................................................................................................. 9 CHAPTER 1. BACKGROUND INFORMATION ....................................................................................... 11 1.1. DEVELOPMENT OF COMPUTER GAMES ................................................................................................. 11 1.1.1. Common development challenges .................................................................................................. 13 1.1.2. Common programming techniques ................................................................................................ 16 1.2. REAL-TIME STRATEGY GAMES (RTS)................................................................................................... 17 1.2.1. Game elements ............................................................................................................................... 18 1.2.2. Common challenges ....................................................................................................................... 20 1.3. MULTIPLAYER GAMES ......................................................................................................................... 21 1.3.1. Common challenges ....................................................................................................................... 22 1.4. GAMES ON MOBILE DEVICES WITH TOUCH SCREENS ............................................................................ 23 1.4.1. Game design challenges ................................................................................................................ 23 1.4.2. Development challenges ................................................................................................................ 27 1.4.3. RTS genre on mobile devices ......................................................................................................... 30 1.5. UNITY3D GAME ENGINE ...................................................................................................................... 34 1.5.1. Component-based programming ................................................................................................... 35 1.5.2. Prefabs ........................................................................................................................................... 36 1.5.3. Plugins ........................................................................................................................................... 37 CHAPTER 2. DESIGN OF "FANTASY ARENA" GAME ......................................................................... 38 2.1. GAME DESIGN DECISIONS .................................................................................................................... 40 2.1.1. Main idea of the game ................................................................................................................... 40 2.1.2. Basic features................................................................................................................................. 41 2.1.3. Limitations ..................................................................................................................................... 42 2.1.4. Commercial requirements .............................................................................................................. 46 2.2. GAME DESCRIPTION ............................................................................................................................ 47 2.2.1. Game mechanics ............................................................................................................................ 47 2.2.2. Game control and GUI .................................................................................................................. 50 2.3. REQUIREMENTS ELICITATION ............................................................................................................... 54 2.3.1. Functional requirements ................................................................................................................ 54 2.3.2. Non-functional requirements ......................................................................................................... 55 2.3.3. Constraints .................................................................................................................................... 56 2.3.4. Low priority requirements ............................................................................................................. 56 CHAPTER 3. IMPLEMENTATION OF "FANTASY ARENA" GAME ................................................... 58 3.1. OVERALL PROJECT STRUCTURE ........................................................................................................... 58 3.1.1. Project assets organization ............................................................................................................ 58 3.1.2. Architecture of the scripts system .................................................................................................. 59 3.2. UNITY3D CUSTOMIZATION .................................................................................................................. 62 3.2.1. Object pooling ............................................................................................................................... 62 3.2.2. Representing global data ............................................................................................................... 63 3.2.3. Messaging ...................................................................................................................................... 64 3.2.4. Controlling animation states ......................................................................................................... 67 3.3. SELECTED GAME FEATURES ................................................................................................................. 68 3.3.1. Processing touches ........................................................................................................................ 68 3.3.2. Orders queue ................................................................................................................................. 70 3.3.3. Map generation and presentation .................................................................................................. 70 3.3.4. Pathfinding .................................................................................................................................... 73 3.3.5. Modular implementation of abilities.............................................................................................. 76 3.3.6. Game actor AI modes .................................................................................................................... 77 3.3.7. GUI ................................................................................................................................................ 79 3.3.8. Data serialization (game save/load) .............................................................................................. 83 3.3.9. Multiplayer mode architecture....................................................................................................... 83 7 3.3.10. Persistent music player ............................................................................................................
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages107 Page
-
File Size-