"Coma" Walkthrough Game - The Creative Process

04:13

One I had created my storyboard, one sheet and walkthrough game map and interactions the next step was the fun part, to make the game!

The Look and Feel

I started off creating the3D models in Maya using the skills that I had learnt previously, by making just one model at a time I was then able to import this separately into Unity and have more freedom to move bits around within the Unity game engine instead of worrying about modelling everything to scale within Maya.

For this walkthrough game brief I was allowed to use basic materials to colour my assets but no textures so I made sure to be able to colour most things individually, making leaves green and bark brown, etc. I also added a skybox. This would help to add to the atmosphere of the game as that's what this whole unit is being marked on.



I also added lights and particles to add to the effect of the game as I had modelled some lantern lights to line to stone pathway, including both a light and a flame particle effect added to the realism and the old-age feel of the game as well as making it a great light source for the game as it was set at night. I added a script to enabled these lights to flicker when the player came close to the light to make it seem even more realistic, as if the flames were flickering in the wind. I could change the radius of these lights so that they shone brightly only on the objects nearby.


We needed audio within our game so I chose to have an old-style radio show to play on the speakers of the game, lined along the pathway to play an eerily happy country tune. By changing the 3D sound settings of this audio I was able to make it so that it went very loud when the player was near and quieter as the player went further away from the object. Having this knowledge was then very useful as I used it on a lot of different objects, such as the trees rustling, the fire lanterns crackling and, of course, the crying sounds coming from the well.


I sourced this music and the sound effects that I used from both YouTube, using the creator studio where there are loads of royalty free music and sound effects to use, and a website called Free Music Archive. So all of this audio is royalty free, meaning that if I did want to make money form it then I could. Once I had downloaded the music I had to alter a lot of it to make it the same volume level and sometimes shorten or lengthen the sound clips. For the radio I had to completely make the audio from scratch as I had a very clear idea of what I wanted the message coming from the radio to be so I used Garageband to piece together white noise and muffled speech until the final: "Wake Up".



The Interactivity

For this game I used C# to code the interactions that I planned out during the storyboarding phase within it. We needed to have at least 3 interactions within our game. The main interactions that I had planned to use were: Doors opening and closing, being able to pick up an axe and use it to destroy the well within the game so I could jump down into the cave below and then interacting with the radio found within the cave as the source of the crying to play an audio clip that tells the player the "Wake up".

At first i was worried that I might have been a tad too ambitious, but with the help of the Unity forums and the internet (thank you Stack Overflow) it didn't take me long to start getting my head around the basic syntax of C#, especially since I have worked using Javascript before, and I went a little overboard on the interactions, adding the flicker script to make the lights flicker as well as scripts to trigger sound effects such as white noise when the player is in the beginning of the game in the house and triggers a light flicker and in the cave near the end. I also added more immersion to the game overall by adding a text UI to show the protagonists thoughts throughout the gameplay, from his bafflement when he first realises he doesn't know where he is, to his shouts down to the 'woman' crying in the well. I started the game by disabling the players movement and adding a dark image on a panel so that the player has to focus on the text that displays on the screen as the protagonist wakes up groggy, thinking he is in his own house and then gasps as he realises that he's not in his house anymore; the dark panel is destroyed and the player is then able to move again to progress through the narrative of the game.



When I knew what I wanted to create through code I would first think of what the process might be, for instance, I didn't want the player to be able to destroy the well until they had hold of the axe so I wanted to check 'if axe picked up = true then on mouse down destroy well'. Thinking about it like this helped me to be able to google and use Unity forums to find out the exact bits of code that I needed to put together to make this work. If anything went wrong or was unresponsive the I would add 'Debug.Log ("something worked") into my code after whatever interaction I was trying to check to see if it was registering as well as checking to console log to see if any errors had been logged. Usually it was something small and silly such as forgetting a semi colon or something, it could get very frustrating at times but when the code worked I felt like God, it is AWESOME!

The hardest part of the coding interactions for me was the whole interaction for picking up the axe, having it physically showing in front of the player, and the using it to explode the well. At first I wasn't quite sure how it was going to work or even what the syntax might be for this but after searching the Unity forums I found that I could use Destory (gameObject); to completely remove an object out of the world and instantiate as a way to create an explosion in the wells place as a game object to make it appear as if I had blown up the well. But of course I couldn't have the script on the well as this object would then be destroyed and I needed the same script to start the radio at the bottom of the well play the crying sounds so that it would sound more realistic and eerie once the player jumped down there so I attached the script to some rocks just below the well and make the collider box a lot bigger so that I could still click on the well for this all to happen. It might not have been the cleanest way of applying this interaction but it's the best way that I could think of.


I also used a 'my globals' script to store all of my global variables so that I could reference them in different scripts, so for the axe being held in front of the player I wanted the position of the axe to be updated for every frame of the game so that it followed where the player moved but only when the player had actually found and clicked on the axe. So I had to check if the axe = true then change the position of it. But then I realised that I was destroying the axe along with the well when I was destroying it and the script still wanted to reference the destroyed axe, coming up with errors in the console log. So I simply added another global variable of axeDetroyed = false and set it to true on the rock script when everything had been destroyed and the checked if axe == true && axeDestoryed == false then show the axe in front of the player.



Overview

Overall I'm very happy with the walkthrough game that I've been able to produce. I feel that the atmosphere is created very well with the mix of visuals, sounds and interactions and that the game narrative flows very well. There are some bugs still within the game that I'd like to smooth out if I had more time, such as the explosion plays even after the well has been destroyed once the player clicks on the rock triggers and the axe positioning in front of the player could be much smoother, but overall I'm very proud of my first attempt at an atmospheric game!



You Might Also Like

0 comments

Popular Posts

Follow me on Twitter

YouTube Channel