Takaisin
Kuvakaappaus pelistä.
Launch-A-Sloth
Yleistä
Opiskeluprojekti (TTOW0221 Game Development Project)
Ryhmätyö (5 hlö)
Pelisuunnittelu, Pelinkehitys, Ohjelmointi
Unity
2021
Pelaa Launch-A-Slothia (WebGL)*
*Dynaaminen musiikki -ominaisuus ei toimi pelin WebGL-versiossa. Syynä on Unity WebGL:n muita versioita rajoitettuneempi audiojärjestelmä. Lisätietoja: Unity Manual: Using Audio in WebGL
Launch-A-Sloth on peli, jota olin mukana kehittämässä osana JAMK:n pelinkehitysmoduulin TTOW0221 Game Development Project -kurssia. Kyseessä on 2D fysiikkapulmapeli, jossa pelaajan täytyy auttaa kotipuustaan pudonnut laiskianen nimeltä Thud takaisin kotiinsa vuorenhuipulle ampumalla hänet tykillä ylös vuorenrinnettä. Pelissä on 11 tasoa.
Pelimekaniikat
Pelaajan täytyy kimpoiluttaa Thudia kenttien seinistä saadakseen tämän kunkin kentän maalille. Jokaisella kentällä on maksimikimpoilumäärä, jonka Thud saa käyttää. Jos pelaaja ei saa Thudia maaliin annetulla määrällä kimpoiluja, hänen täytyy yrittää uudestaan erilaisilla kulma- ja voima-asetuksilla.
Jokaisessa tasossa on 2 kerättävää objektia. Ensimmäinen on tähti, joka on kentän maali ja joka siten on pakko saavuttaa, jotta voi päästä seuraavalle kentälle. Toinen kerättävä kohde on lehti, jonka kerääminen on vapaaehtoinen lisähaaste, jonka suorittamalla voi saada paremman tähtiluokituksen tasosta.
Kun pelaaja saavuttaa kentän maalina toimivan tähden, hänelle annetaan kentästä 1-3:n tähden luokitus seuraavin perustein:
- 1 tähti kentän läpäisemisestä
- +1 tähti kentän läpäisemisestä käyttäen alle 50% annetuista kimpoiluista
- +1 tähti lehden keräämisestä
Edistyneet ominaisuudet
Pelissä on dynaaminen musiikki -ominaisuus, joka kiihdyttää musiikin nopeutta aina, kun pelaaja laukaisee Thudin tykistä. Olin vastuussa ominaisuuden ohjelmoinnista. Jokaisesta taustamusiikkikappaleesta on kaksi versiota, normaali ja tuplatempoversio. Peli vaihtaa näiden kahden välillä ohjelmallisesti. Kappale, johon vaihdetaan, täytyy "kelata" oikeaan kohtaan, joka saadaan joko jakamalla tai kertomalla soivan kappaleen toiston sijainti kahdella, riippuen siitä vaihdetaanko normaalista tuplanopeuteen vai päinvastoin.
Taustamusiikista on kolme versiota, kesäteema, syksyteema ja talviteema, joiden välillä vaihdetaan tason teeman perusteella. Jokaisesta näistä on normaali- ja tuplatempoiset versiot. Syksy- ja talviteemojen perustempo on matalampi kuin kesäteeman, mikä aiheuttaa lisähaasteita musiikin vaihtamiseen, sillä vaihto kesäteemasta syksy- tai talviteemaan tai päinvastoin yhtä yksinkertaista kuin nopeamman ja hitaamman version välillä vaihtaminen, sillä tempojen suhde ei enää olekaan aina 1:2. Ratkaisin ongelman tekemällä kaikkien tempojen välisistä suhteista matriisin, josta kappaletta vaihdettaessa voidaan lukea oikea muuntokerroin nykyisen kappaleen id:n ja sen tilalle halutun kappaleen id:n perusteella.
Roolini projektissa
Pelinkehitysprojektissa roolejani olivat pelisuunnittelija, pelinkehittäjä ja ohjelmoija. Suunnittelin alkuperäisen peli-idean pelinkehitysmoduulin yksilötyönä tehdyn TTOW0211 Basics of Game Design -kurssin harjoitustyönä. Ideani valikoitui noin viidentoista idean joukosta. Ideoista valittiin kolme, joita lähdettiin kehittämään kurssin opiskelijoista muodostetuissa ryhmissä. Projektin aikana olin aktiivisesti mukana pelisuunnittelussa ja -suunnittelukysymyksiä pohdittaessa.
Pelinkehittäjänä ja ohjelmoijana olin mukana rakentamassa peliä Unity-pelimoottorilla. Yllä mainitun musiikkiominaisuuden lisäksi otin vastuulleni Unity-projektin organisoinnin. Tein peliobjekteista uudelleenkäytettäviä prefabeja sekä loin kopioitavan templaattiscenen tasojen luomista varten. Lisäksi ohjelmoin muun muassa askelluksen kulman- ja voimansäätöön. Askellukseen liittyen ohjelmoin Unity-editoriin visualisoinnin tykille tasokohtaisesti asetetuista minimi- ja maksimikulmista sekä käytetystä askelluksesta ja aloituskulmasta. Visualisointityökalut tekivät asetusten säätämisestä helpompaa, sillä kehittäjän ei tarvinnut enää testata asetuksia joka välissä ajamalla peliä.
Tasokohtaiset askellus- ja rajoitusasetukset jäivät kuitenkin projektin päättövaiheen kiireessä hienosäätämättä joidenkin tasojen kohdalla, mikä tekee kyseisten tasojen pelikokemuksesta hieman turhauttavan, sillä pelaaja ei välttämättä pysty valitsemaan sellaista kulmaa tai voimaa kuin haluaisi.
Back
Screenshot of Launch-A-Sloth.
Launch-A-Sloth
Overview
School project (TTOW0221 Game Development Project)
Group work (5 developers)
Game Design, Game Development, Programming
Unity
2021
Play Launch-A-Sloth (WebGL)*
*Dynamic music switch feature of the game isn't available in the WebGL build. The reason for this is that Unity's audio system is more limited on the WebGL platform than other supported platforms. More information: Unity Manual: Using Audio in WebGL.
Launch-A-Sloth is a game made for the TTOW0221 Game Development Project course of JAMK's Game Development Module. It is a 2D physics puzzle game where the player has to use a cannon to launch a sloth called Thud upwards so he can eventually reach his home at the top of the mountain, from where he fell. The game has 11 levels.
Game mechanics
The player has to bounce Thud around the walls of the levels in order to reach the level goal. There's only a limited amount of bounces available for each level, and if Thud doesn't reach the goal before running out of bounces, the player will have to try again with a different launch configuration.
In each level, there's 2 objects the player can collect. The star is the level goal, which the player has to reach in order to progress to the next level. The leaf is an optional challenge item the player can collect to get a better rating on the level.
When the player reaches the goal they will be given a 1-3 star rating based on the following factors:
- 1 star for beating the level
- +1 star for beating the level with < 50% of the given bounces used
- +1 star for collecting the leaf
Advanced features
The game features a dynamic music switch feature which speeds up the background music when the player launches Thud from the cannon. I programmed the feature. The way it works is that there's two versions of each background song: normal and double tempo and the code changes the song on the fly. For making the switch as smooth as possible, there was some mathematics involved, the other song had to be "wound up" to the position corresponding to the song currently playing.
In addition to this tempo switch the theme song also switches between different themes based on seasons in different levels. Some of these song variants have different tempos in relation to each other and as the change in tempo is not as simple as in the speed-up / slow-down transition where the relation was 1:2, some more mathematics had to be used to calculate the correct wind-up factor. I ended up programming a conversion matrix that is initialized with the ratios of the diffferent values of tempos of each version of each song in relation to the other songs. The wind-up factor between two songs can then be read from the matrix by using the current song id and the new song id.
My role in the project
My roles in the game development project were game designer, game developer and programmer. I designed the original game idea as the main practical work of the individual work course TTOW0211 Basics of Game Design which was a part of the game development module. My idea was selected from a group of circa 15 game ideas of which three were picked to be worked on in groups of five consisting of the students of the game project course. During the project I was actively taking part in the designing of the game.
I was involved in building the game in the Unity game engine in the role of a game developer and programmer. In addition to the dynamic music feature I took it upon myself to take control of the organization of the Unity project. I made game objects into reusable prefabs and built a template scene to base new levels on. I also programmed the stepping in the angle and power adjustment. I wrote a script that visualizes the level specific minimum and maximum angle settings as well as the stepping and starting angle. These tools made it easier to adjust the settings without testing them in-game.
Unfortunately, for some of the levels the level specific angle and power stepping settings were left without the required fine tuning in the rush of the finishing stages of the project. This makes the play experience of those levels a little frustrating as the player may not be able to select an angle or power they would want to use.