
Bachelor’s thesis Information and Communications Technology | Game Development 2019 Mika Anttonen ONLINE MULTIPLAYER ON MOBILE GAME BACHELOR’S THESIS | ABSTRACT TURKU UNIVERSITY OF APPLIED SCIENCES Information and Communications Technology | Game Development 2019 | number of pages: 55, number of pages in appendices: 3 Supervisor: Principal Lecturer Mika Luimula, Adj.Prof Mika Anttonen ONLINE MULTIPLAYER ON MOBILE GAME In the present gaming world, multiplayer games are the rulers in business. The greatest gaming companies make more money from selling services inside online games than from selling new games ever. Unity’s decision to completely overhaul their game engine’s network functions will bring a significant change on how smaller developers will be able to develop their games. The goal of the thesis was to compare different approaches towards developing multiplayer games and to use one of those approaches add online multiplayer functions on a mobile game. The game is an updated and ported version of an unpublished 2D space shooter made by Markus Leinonen and Iisko Lappalainen and it is called X-Craft. The original version was created as a computer game using the Pascal programming language. Developing multiplayer functions depends greatly on which game engine is used. After researching different options, Unity was chosen as the game engine for X-Craft. In August 2018, Unity announced they will renew the engine’s networking tools. Due to the announcement, Photon Unity Networking was chosen to be used for developing multiplayer functions. The thesis discusses planning a multiplayer game followed by comparisons between a few popular game engines. It also delves into the future of developing a multiplayer game with Unity based on blogs and articles available during the time of the writing of the thesis. The asset used in the development of X-Craft is called Photon Unity Networking is introduced on the level it has been used. The updated version was made using Unity and C# programming language. The development of the game was the responsibility of the author with the clients being part of planning and testing of the game. The results are going to be a part of the final version of X-Craft. The game was tested in different locations and with different devices. Even though the results on playability were not ideal, the results on the multiplayer functionalities exceeded expectations and gave a good direction on how the development of X-Craft should continue. The development will continue according to the plans made based on the result of testing. KEYWORDS: multiplayer, Unity, C#, mobile game, game development, Photon Unity Networking OPINNÄYTETYÖ (AMK) | TIIVISTELMÄ TURUN AMMATTIKORKEAKOULU Tieto- ja viestintätekniikka | Peliteknologia 2019 | 55 sivua, 3 liitesivua Ohjaaja: yliopettaja Mika Luimula, dosentti Mika Anttonen VERKKOMONINPELI MOBIILIPELISSÄ Click here to enter text. Nykyisessä videopelien maailmassa moninpeli on markkinoiden johtavassa asemassa. Suuret peliyhtiöt saavat enemmän rahaa verkkopelien sisällä myytävistä palveluista kuin ne ovat saaneet uusien pelien myynnistä koskaan. Unityn päätös tehdä pelimoottorinsa verkkotoiminnot kokonaan uudestaan tuovat mukanaan suuren muutoksen siihen miten pienemmät pelien kehittäjät voivat kehittää pelinsä. Opinnäytetyön tarkoituksena oli tutkia eri lähestymistapoja moninpelin kehittämisessä ja lisätä verkkomoninpeliin tarvittavat funktiot mobiilipeliin jollain kyseisistä lähestymistavoista. Peli on päivitetty versio ennen julkaisemattomasta tietokoneelle tehdystä 2D space shooterista nimeltä X-Craft. Alkuperäisen version tekivät Markus Leinonen ja Iisko Lappalainen. Alkuperäisen version koodi on kirjoitettu Pascal-ohjelmointikielellä. Pelimoottori vaikuttaa suuresti moninpelin toteutukseen. Eri vaihtoehtojen tutkimisen jälkeen X- Craftin pelimoottoriksi valittiin Unity. Unity ilmoitti elokuussa 2018 pelimoottorin verkkotyökalujen uudistuksesta. Ilmoituksen johdosta, moninpelin kehittämiseen päätettiin käyttää Photon Unity Networking nimistä työkalua. Päivitetty versio tehdään Unityllä ja C# -ohjelmointikielellä. Toimeksiantajat ovat olleet mukana pelin suunnittelussa ja testauksessa. Tulokset tulevat olemaan osa X-Craftin lopullista versiota. Peliä testattiin eri alueilla ja erilaisilla laitteilla. Vaikka pelattavuuden kannalta tulokset eivät näyttäneet ideaalisilta, moninpelin tulokset ylittivät vähimmäisodotukset ja antoivat hyvin suuntaa millä tavalla X-Craftin kehitystä kannattaa jatkaa. Pelin kehitys tulee jatkumaan tulevaisuudessa testien pohjalta tehtyjen suunnitelmia myötäillen. ASIASANAT: moninpeli, Unity, C#, mobiilipeli, pelinkehitys, Photon Unity Networking CONTENTS LIST OF ABBREVIATIONS (OR) SYMBOLS 5 1 INTRODUCTION 0 2 ONLINE MULTIPLAYER 2 2.1 Planning an online multiplayer game in general 2 2.2 Differences between game engines 4 3 UNITY NETWORKING 2019 AND FORWARD 7 3.1 Schedule of the new multiplayer solution 7 3.2 Connected Games 8 3.3 Change the topic 9 4 PHOTON UNITY NETWORKING 11 4.1 Using PUN and differences to UNet – Editor 11 4.2 PUN in programming 14 5 X-CRAFT 17 6 MATCHMAKING 20 6.1 Requirements and planning 20 6.2 Lobby 21 6.3 Inside a room 27 7 DURING A MATCH 31 7.1 Requirements and planning 31 7.2 Development 32 7.2.1 Gameplay in Unity Editor 32 7.2.2 Gameplay scripts 33 8 TESTING 42 8.1 Planning 42 8.2 Execution 43 8.3 Results 44 9 CONCLUSION 46 REFERENCES 48 APPENDICES Appendix 1. Feedback form in testing. FIGURES Figure 1. Schedule of Unity's new multiplayer features. 8 Figure 2. Player's Photon View. 12 Figure 3. Photon Transform View. 13 Figure 4. Photon Rigidbody 2D View. 14 Figure 5. Sharing shooter of projectile in Damage script. 16 Figure 6. Original menu for selecting maps. 17 Figure 7. Screenshot of the original version. 18 Figure 8. Player settings. 21 Figure 9. Main lobby. 22 Figure 10. View inside a room. 27 TABLES Table 1. Deciding factors on choosing game engine. 6 LIST OF ABBREVIATIONS (OR) SYMBOLS API Application Programming Interface CCU Concurrent Users CPU Central Processing Unit EA Electronic Arts ECS Entity Component System FPS First Person Shooter GEQ Game Experience Questionnaire HLAPI High Level Application Programming Interface ID Identifier IP Internet Protocol LAN Local Area Network LLAPI Low Level Application Programming Interface LTS Long Term Support MMORPG Massively Multiplayer Online Role-Playing Game OS Operating System PC Personal Computer PUN Photon Unity Networking, might refer to the asset or the service in general PVP Player Versus Player RPC Remote Procedure Call VR Virtual Reality UNet Unity Networking 0 1 INTRODUCTION Playing with friends has become an essential part of gaming. It has become so important that EA’s Chief Financial Officer Blake Jorgensen told that one reason behind cancelling the anticipated Star Wars game from Visceral Games was that it “continued to look like a much more linear game [which] people don’t like as much today as they did five years ago or ten years ago”(Jorgensen 2017). Many saw this as a statement on EA focusing on multiplayer games in the future. The trend can also be seen on streaming site twitch.tv where most streams on the front page show people playing multiplayer games such as Fortnite or PlayerUnknown's Battlegrounds. This thesis focuses on bringing that possibility on a mobile game(VG24/7.2017). X-Craft is an unpublished game made originally by Markus Leinonen and Iisko Lappalainen, who were also the clients of this thesis, during 1990s. X-Craft is a 2D dungeon shooter where the player flies a spaceship and tries to destroy enemies’ spaceships while surviving themselves. This thesis discusses the process of making the necessary functions for making this an online multiplayer game using Unity. The clients had shown interest in working with the author after previous experiences with him. After considering a few options, developing multiplayer functionalities on mobile devices was picked as the topic of the thesis as multiplayer mode will be one of the main components of X-Craft. Other options would have required a lot more progress before development on them before they could start. Multiplayer functions were, however, something that was supposed to be worked on soon. At the end of the thesis, X-Craft would have working gameplay over network, simple matchmaking, two game modes and scoreboard that the players could check during a match. If time allowed, work on some sort of league or prestige system would be implemented. This thesis is divided roughly in two parts. The first few chapters concentrate on the theoretical part. Chapter 1 discusses online multiplayer games in general. The chapter starts with the definition of online multiplaying followed by how multiplayer functionality in games is designed. Finally, the chapter compares different game engines and how they approach developing multiplayer games. 1 Chapter 2 focuses on Unity. Unity is currently renewing their networking solution. This chapter discusses the new solution based on information that has been published on official websites and forums. Chapter 3introduces an asset called Photon Unity Networking. Basics of the asset are discussed, and comparisons are made between Photon and Unity’s old solution, UNet. Some of the components will be discussed with examples from X-Craft. Chapter 4 discusses the differences between the original version and the new updated version of X-Craft. It also introduces the game more, so the reader understands better what is needed during the development. After Chapter 4, come
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages59 Page
-
File Size-