Musapeliprojekti – Music Game Project

Screenshot from "Selvät Sävelet" (Clear Tunes) game demo
Screenshot from “Selvät Sävelet” (Clear Tunes) game demo

Marraskuun alussa alkoi uusi kurssi, joka oli soveltamista saman moduulin kurssien asioista. Olimme opetelleet tekemään pelejä Unity-pelimoottorilla ja tutustuneen PHP- ohjelmointikieleen ja tietokantayhteyksiin.

Nyt saimme tehtäväksi toteuttaa pelillistä oppimista joko musiikin tai kirjaston parissa ja asiakkaana toimi Mäntyharjun kirjasto. Heti kun kuulin, että on mahdollisuus tehdä jotain musiikillista, ehdotin nopeasti muodostuneelle ryhmällemme, että lähdettäisikö musiikin suuntaan oman taustani perusteella. Muilla ei ollut mitään ajatusta vastaan ja niin lähdimme hahmottelemaan musiikkipeliä.

Pyörittelimme ideoita maailman musiikista lähtien ja lopulta lukitsimme idean 2D-tasohyppelyksi, joka tutustuttaa klassisen musiikin maailmaan. Lähtökohtana oli ottaa käyttöön jo valmiiksi tunnettuja ja tekijävapaita teoksia.

Screenshot from "Selvät Sävelet" (Clear Tunes) game demo
Screenshot from “Selvät Sävelet” (Clear Tunes) game demo

Reilussa kuukaudessa rakensimme yhdessä yksitasoisen demoversion, jossa konserttisalissa asuva hiiri auttaa etsimään sinfoniaorkesterin kadonneita nuotteja ja instrumentteja. Orkesteri on kiertueella ja kaikki tavarat tippuvat lentokoneesta ja leviävät ympäri kaupungin kattoja. Hiiri kerää tavarat tason lopussa olevaan matkalaukkuun.

Kerättävistä nuoteista kuulee äänen, ensimmäisessä tasossa poikkihuilulla soitettuna. Äänet ilmestyvät nuottiviivastolle ja samalla tulee näkyviin nuotin nimi. Nuotit muodostavat tutun melodian pätkän. Ensimmäiselle tasolle valitsimme Edvard Griegin Aamutunnelman Peer Gynt -sarjasta. Kyseisen teoksen päämelodian esittelee ensimmäisenä huilu, joten tasossa kerätään myös huiluja.

Tason lopussa nuottien muodostama melodia näytetään videona, jossa pystyy karaoketyyliin seurata kuulemiansa nuotteja. Tämän jälkeen ilmestyy infosivu, jossa on kuvat Edvard Griegistä ja poikkihuilusta, lyhyt esittely säveltäjästä, teoksesta ja soittimesta.

Screenshot from "Selvät Sävelet" (Clear Tunes) game demo
Screenshot from “Selvät Sävelet” (Clear Tunes) game demo

Projektin alussa olin kiinnostunut oppimaan uutta backend-puolesta, mutta melko pian oma roolini asettui frontin puolelle. Halusin tietysti olla mukana myös musiikkimateriaalien tuottamisessa ja muussa äänimaisemoinnissa. Pääsin käyttämään valmiita taitojani niin musiikin kuin median editoinnin parissa. Toteutin loppuvideon MuseScore -nuotinkirjoitusohjelman avulla ja editoin OpenShot-videoeditorilla. MuseScorella sain myös tuotettua yhden sävelen äänitiedostot. Ulkona kävin äänittämässä äänityslaitteessani lähipuistossa liikenteen hälyä ja lintujen laulua. Sattuipa samalla lentämään lentokone ohi, ja sain talletettua myös sen äänen alkuanimaatiotamme varten.

Äänimaailman luomiseen osallistui myös toinen ryhmäläisemme lahjoittamalla hiirelle äännähdyksiä. Testasin Audacityn mahdollisuuksia ja muokkasin äänestä hieman korkeamman ja hiirimäisemmän. Lopulta päädyin myös piirtämään hahmon ja ensin käsin ja editoimaan loput animaatioita varten Gimpillä.

Mainitsen kaikki nämä open source eli avoimen lähdekoodin ohjelmistot, koska haluan kannustaa kaikkia kiinnostuneita tarttumaan niihin. Ohjelmat ovat ilmaisia ja niiden käytöstä löytyy valtavasti ohjeita eli jos kuvienkäsittely, nuottien kirjoittaminen tai videoiden editointi kiinnostaa, niin tutustu näihin! Olen itse harrastellut kaikkien parissa ja nyt sain ottaa nämä kertyneet taidot käyttöön opiskeluprojektissa.

Materiaalien valmistelun jälkeen alkoi pelin yhteen kokoaminen Unityn kanssa. Olin aiemmin toteuttanut pienen 3D-pelin ja en ollut vielä kovin innostunut. Nyt tilanne oli erilainen, koska päätimme itse, mitä toimintoja halusimme peliin ja ratkaisimme niiden toteutukset itse. Tämä tapahtuu yhdistelemällä editointia itse Unityssa sekä kirjoittamalla koodia, joka toteuttaa tapahtumia, kuten esimerkiksi hiiren erilaiset kuvat hahmon liikkuessa ja äänet.

Koko ajan varmistuu itselle se, että juuri koodin kirjoittaminen on itselle hauskinta, mutta tässä projektissa oli myös ihanaa huomata, että omasta ammattitaidosta niin muusikkona kuin pedagogina on hyötyä. Tulevaisuudessa olisikin mielenkiintoista pystyä yhdistämään sekä uutta että vanhaa osaamista. Toki opin paljon uutta myös tiimiprojektin tekemisestä.

Tämän peliprojektin myötä minulla alkaa joululoma, joten hyvää joulua ja loppuvuotta kaikille!

Screenshot from "Selvät Sävelet" (Clear Tunes) game demo
Screenshot from “Selvät Sävelet” (Clear Tunes) game demo

In the beginning of November, we started a new course with application of the same module previous courses. We had learned about creating games with Unity gaming engine and got to know some PHP programming with database connections.

We were assigned to create learning through gaming either with music or library and one library was our customer. As soon as I heard that we had a possibility do something with music, I got excited and proposed it to my team. I explained that I am educated musician and pedagogue. Other members of the team agreed, and we started to sketch a music game.

We brainstormed with different ideas from world music to other ideas and finally decided about a 2D platform game with classical music. We wanted to use royalty free music and something familiar for everyone.

Little bit over one month we build together one level demo version of the game. There is a mouse, who lives in a concert hall and will help lost items of the symphonic orchestra. Orchestra has a tournee and the airplane drops all the notes and instruments out of the plane. The mouse will gather items to a suitcase at the end of the level.

Screenshot from "Selvät Sävelet" (Clear Tunes) game demo
Screenshot from “Selvät Sävelet” (Clear Tunes) game demo

When the mouse hits a note, the pitch will play with flute sound and accordingly a note will appear on the staff below the screen with the name of the pitch. Together notes will form a melody of a famous tune. The first level had Edvard Grieg’s Morning Mood from Peer Gynt suite. The melody in the beginning is presented by the flute and we chose the flute to be the pickup instrument for the first level.

At the end of the level, a video will play and show the notes while playing in the karaoke style. After the video there will be info page about the composer and the piece and also little bit information about the instrument with images.

At the beginning of the project, I was interested in learning about the backend development of the game. However, quite soon I realized that I ended up on the front. I of course wanted to take responsibility of the production of the music materials and other sounds. I could use my knowledge of the media editing. I recorded the video from MuseScore playback and edited it with OpenShot. I also created one note sound files with MuseScore and recorded background sounds outdoors in a park. I was happy to get also sounds of an airplane by chance for our game intro animation.

One of the team members recorded sounds for the mouse. I edited them a bit higher with Audacity to sound more mouselike. I also ended up drawing the mouse character by hand and editing it for the animations with Gimp.

Mouse
Mouse Character by Heli Palomaa

The reason I mention all these open-source software is that I want to encourage everyone interested in media editing to explore those free software. There is tons of nice tutorials about how to use them and I was super happy to be able to use my knowledge and hobbies for this project.

After getting all materials ready we started to put it all together in Unity. Previously I made a tiny 3D game demo with Unity, but I wasn’t that thrilled about it. Somehow it was different now that we could make our own decisions of the game entirely and tried to find ways to implement those ideas. This is done by combining the editing in the Unity with writing code scripts that will complete various events like for example different image while the mouse is moving and sounds it makes.

For me it becomes all the time more and more clear that writing the code is the best part of my studies. It was also wonderful to realize that in this project I could utilize my professional knowledge as a musician and pedagogue. In the future I would like to combine ICT and music in some way. Of course, I also learned a lot about working in team project.

End of this project means also end of this semester and beginning of the holiday season. I wish Merry Christmas and Happy New Year to everyone!

Screenshot from "Selvät Sävelet" (Clear Tunes) game demo
Screenshot from “Selvät Sävelet” (Clear Tunes) game demo

Leave a comment