Verkkopelin kehitys Web-ohjelmointikieliä ja työkaluja käyttäen
Kallio, Mikko (2024)
Kallio, Mikko
2024
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-2024120533472
https://urn.fi/URN:NBN:fi:amk-2024120533472
Tiivistelmä
Tämän opinnäytetyön tarkoitus on luoda verkkopeli Web-ohjelmointikieliä ja työkaluja käyttäen. Työn tarkoituksena on tutkia, kuinka kattavan ja realistisen pelin Web-ohjelmointiin soveltuvilla kielillä ja työkaluilla on mahdollista luoda. Tarkoituksena on samalla perehdyttää opinnäytetyön tekijää niin Web-ohjelmoinnin kuin pelikehityksen aloihin.
Työssä käytetiin ohjelmointikielinä HTML:ää, CSS:ää sekä JavaScriptiä ja kaikki työn vaiheet ja muutokset tallennettiin GitHubiin Git versionhallintatyökalun avulla. Tietokantana käytettiin MySQL:a ja palvelimen hallintaan käytettiin PHP-komentokieltä. Koodieditorina käytettiin Visual Studio Codea ja pelin testaaminen paikallisessa palvelimessa toteutettiin MAMP:n avulla. Realistilla fysiikkamalleina käytettiin Marco Monsterin luomia fysiikkakaavoja. Työ toteutettiin kolmessa eri vaiheessa: ensimmäisenä toteutettiin pelin perusmekaniikat, toisessa vaiheessa peli siirrettiin ajettavaksi palvelimeen ja viimeisessä vaiheessa luotiin ja korjattiin muutamia pienempiä toimintoja.
Työn tuloksena luotiin varsin onnistunut ajopeli. Pelin tärkeimmät ominaisuudet saatiin luotua ja toimimaan riittävän onnistuneesti. Ajoneuvot pelissä saatiin myös paikoin käyttäytymään fysikaalisesti realistisella tavalla. Projektissa ja pelissä on joitakin pieniä virheitä ja puutteita, jotka jäävät hyviksi jatkokehittämiskohteiksi tulevaisuudessa. Työ kuitenkin todistaa, että pelkillä Web-ohjelmoinnin kielillä ja työkaluilla voi luoda kattavan ja laaja-alaisen pelin. The purpose of this thesis was to create an online game with Web development languages and tools. The aim was to investigate how comprehensive and realistic a game it is possible to create by languages and tools suitable for Web development. The purpose was also to develop the thesis author for fields of both Web and game development.
HTML, CSS and JavaScript were used as programming languages and all phases and changes were saved in GitHub by the Git version control tool. MySQL was used as a database and the PHP script language for controlling server. Visual Studio Code was used as a code editor and testing the game in the local server was executed by MAMP. Physics formulas created by Marco Monster were used as realistic physics models. The thesis was implemented in three different periods, first the basic mechanics of the game were implemented, in the second phase, the game was transferred to be executed in the server and in the final phase, a few small functions were created and fixed.
A fairly successful game was created as a result of the thesis. The most crucial functions of the game were created and they work well enough. Vehicles work in a physically realistic way in some parts of. There are some minor errors and deficiencies in the project and in the game, which a good target for further development in the future. Overall, the thesis proves that a comprehensive and wide-ranging game can be created just by Web development languages and tools. 
Työssä käytetiin ohjelmointikielinä HTML:ää, CSS:ää sekä JavaScriptiä ja kaikki työn vaiheet ja muutokset tallennettiin GitHubiin Git versionhallintatyökalun avulla. Tietokantana käytettiin MySQL:a ja palvelimen hallintaan käytettiin PHP-komentokieltä. Koodieditorina käytettiin Visual Studio Codea ja pelin testaaminen paikallisessa palvelimessa toteutettiin MAMP:n avulla. Realistilla fysiikkamalleina käytettiin Marco Monsterin luomia fysiikkakaavoja. Työ toteutettiin kolmessa eri vaiheessa: ensimmäisenä toteutettiin pelin perusmekaniikat, toisessa vaiheessa peli siirrettiin ajettavaksi palvelimeen ja viimeisessä vaiheessa luotiin ja korjattiin muutamia pienempiä toimintoja.
Työn tuloksena luotiin varsin onnistunut ajopeli. Pelin tärkeimmät ominaisuudet saatiin luotua ja toimimaan riittävän onnistuneesti. Ajoneuvot pelissä saatiin myös paikoin käyttäytymään fysikaalisesti realistisella tavalla. Projektissa ja pelissä on joitakin pieniä virheitä ja puutteita, jotka jäävät hyviksi jatkokehittämiskohteiksi tulevaisuudessa. Työ kuitenkin todistaa, että pelkillä Web-ohjelmoinnin kielillä ja työkaluilla voi luoda kattavan ja laaja-alaisen pelin.
HTML, CSS and JavaScript were used as programming languages and all phases and changes were saved in GitHub by the Git version control tool. MySQL was used as a database and the PHP script language for controlling server. Visual Studio Code was used as a code editor and testing the game in the local server was executed by MAMP. Physics formulas created by Marco Monster were used as realistic physics models. The thesis was implemented in three different periods, first the basic mechanics of the game were implemented, in the second phase, the game was transferred to be executed in the server and in the final phase, a few small functions were created and fixed.
A fairly successful game was created as a result of the thesis. The most crucial functions of the game were created and they work well enough. Vehicles work in a physically realistic way in some parts of. There are some minor errors and deficiencies in the project and in the game, which a good target for further development in the future. Overall, the thesis proves that a comprehensive and wide-ranging game can be created just by Web development languages and tools.
