Edistyneiden liikemekaniikkojen toteuttaminen verkkomoninpeliin
Forsblom, Onni (2023)
Forsblom, Onni
2023
All rights reserved. This publication is copyrighted. You may download, display and print it for Your own personal use. Commercial use is prohibited.
Julkaisun pysyvä osoite on
https://urn.fi/URN:NBN:fi:amk-2023121537774
https://urn.fi/URN:NBN:fi:amk-2023121537774
Tiivistelmä
Tämän opinnäytetyön tavoitteena oli toteuttaa neljä sulavasti toimivaa liikemekaniikkaa verkkomoninpeliin: teleportaatio, liikkeen suorittaminen takaperin määritellyltä ajanjaksolta sekä seinäjuoksu ja -hyppy. Työn tavoitteena oli myös tutkia ja vertailla kahta erilaista moninpeleissä hyödynnettyjä ohjelmistoarkkitehtuuria.
Työn kehitysympäristönä toimivat asiakas-palvelin-mallia hyödyntävä Unreal Engine 5 -pelimoottori sekä Epic Games -yrityksen tarjoama Lyra Starter Game -esimerkkiprojekti. Mekaniikat toteutettiin Unreal Engine -moottorin tarjoamalla hahmon liikkumiskomponentilla sekä Gameplay Ability -järjestelmällä. Kaikkia tuotoksia testattiin simuloimalla pelaamista verkossa asiakkaan roolissa verkkopakettien viiveen kanssa.
Yksinkertaisen teleportaatiotaidon toteuttaminen Gameplay Ability -järjestelmällä oli sekä helppoa että intuitiivista. Kuitenkin testatessa tällaisia toteutuksia suurella verkkopakettien viiveellä korjaustilanteita esiintyi enemmän verrattuna liikekomponenttia hyödyntävään toteutukseen, etenkin ajan kelaamisen kohdalla. Mekaniikkojen toteuttaminen hahmon liikekomponentilla oli taas monimutkaisempaa, mutta kokonaisuutena erittäin opettava kokemus. Seinäjuoksu- ja hyppymekaniikan toteuttamiselle ei tätä työtä varten riittänyt aikaa, mutta kyseisten mekaniikkojen luomiseen verkkomoninpeliä varten löytyi valmiita toteutuksia. The objective of this thesis was to implement four seamlessly functioning movement mechanics for an online multiplayer game: teleportation, executing movement backwards from a defined period of time, wall running, and wall jumping. Another academic goal of this thesis was to examine and compare two distinct software architectures frequently utilized in multiplayer games.
The development environment for this work comprised of the client-server model utilizing Unreal Engine 5 game engine, and the Lyra Starter Game example project provided by Epic Games. The mechanics were realized using the character movement component and the Gameplay Ability System provided by Unreal Engine. All implementations were tested by simulating online gameplay in the client role along with packet lag.
Implementing the straightforward teleportation ability with the Gameplay Ability system proved to be both easy and intuitive. However, when testing such implementations with significant packet lag, more instances of server-reconciliation occurred compared to implementations utilizing the movement component, especially in the case of time rewinding. In contrast, implementing the mechanics using the character movement component was more intricate but overall a very instructive experience. Time constraints prevented the development of wall run and wall jump mechanics for this thesis, but readily available implementations of these mechanics in the context of online multiplayer games were found.
Työn kehitysympäristönä toimivat asiakas-palvelin-mallia hyödyntävä Unreal Engine 5 -pelimoottori sekä Epic Games -yrityksen tarjoama Lyra Starter Game -esimerkkiprojekti. Mekaniikat toteutettiin Unreal Engine -moottorin tarjoamalla hahmon liikkumiskomponentilla sekä Gameplay Ability -järjestelmällä. Kaikkia tuotoksia testattiin simuloimalla pelaamista verkossa asiakkaan roolissa verkkopakettien viiveen kanssa.
Yksinkertaisen teleportaatiotaidon toteuttaminen Gameplay Ability -järjestelmällä oli sekä helppoa että intuitiivista. Kuitenkin testatessa tällaisia toteutuksia suurella verkkopakettien viiveellä korjaustilanteita esiintyi enemmän verrattuna liikekomponenttia hyödyntävään toteutukseen, etenkin ajan kelaamisen kohdalla. Mekaniikkojen toteuttaminen hahmon liikekomponentilla oli taas monimutkaisempaa, mutta kokonaisuutena erittäin opettava kokemus. Seinäjuoksu- ja hyppymekaniikan toteuttamiselle ei tätä työtä varten riittänyt aikaa, mutta kyseisten mekaniikkojen luomiseen verkkomoninpeliä varten löytyi valmiita toteutuksia.
The development environment for this work comprised of the client-server model utilizing Unreal Engine 5 game engine, and the Lyra Starter Game example project provided by Epic Games. The mechanics were realized using the character movement component and the Gameplay Ability System provided by Unreal Engine. All implementations were tested by simulating online gameplay in the client role along with packet lag.
Implementing the straightforward teleportation ability with the Gameplay Ability system proved to be both easy and intuitive. However, when testing such implementations with significant packet lag, more instances of server-reconciliation occurred compared to implementations utilizing the movement component, especially in the case of time rewinding. In contrast, implementing the mechanics using the character movement component was more intricate but overall a very instructive experience. Time constraints prevented the development of wall run and wall jump mechanics for this thesis, but readily available implementations of these mechanics in the context of online multiplayer games were found.