Battle Arena "Sunken Robot Ship" - The Creative Process

Once I had planned out what my Battle Arena was going to look like and gotten the hand of how to model a bit better in Maya I was then able to build my battle arena!

Modelling Process

For this battle arena, even though we had to import it into Unity at the end and animate a camera around the scene, I decided to model my whole environment to scale within Maya, unlike my Game Walkthrough. I have already done a blog post on how I learned to 3D model in Maya, so look at that if you haven't already seen it, but I basically used these techniques to 3D model my environment.

I realised that I had made things hard for myself because I was trying to model everything inside a closed boat and wasn't too sure how the best way to go around this was but then I was told that the arena needed to be in an open environment so that made my life easier. Instead, I changed my design a bit to make the boat look old and rusted, as if it had sunken a while back. This also fitted with the steampunk look that I wanted to create anyway so I still stuck with my original steampunk / robotic design ideas for the windows, chest filled with nuts and bolts and other things.

I attempted to make very complex 3D models such as fish, underwater anemone and of course, the robot Josef from Machinarium. I also used ncloth to create a realistic cloth model over the table within the boat which I then combined into the table to make into a mesh.



Little did I know that these complex (and sometimes rather messy) 3D models would come to haunt me during the texturing process of this battle arena....

Texturing Process

I'm going to be honest here, at first I found texturing extremely daunting. Mainly because of the UV maps that I had created for myself during the complex 3d modelling of a lot of my objects. I had a lot of work to do, stitching them together and then using the outline image as a reference to create my own textures. I turned on the turtle option for baking and reset the settings and output file so that I could bake my UV map and use that as a visual reference to how it looks as well as exporting the UV snapshot for the outlines of the UV map. I could then open these both in Photoshop and start creating my own textures for that object. I usually did this by gathering lots of different source images, such as rock, moss and coral and overlapping them, making them tile and using the eraser at different opacity settings to blend them all together to make a completely new texture out of the combined ones. I also used the layers overlay settings to change how a layer could look when on top of others, either making it hardlit, or just using the colour from the image, etc. I found this technique extremely useful because I wanted to keep the Machinarium art style within my battle arena so a lot of the time I would look for images of the game and then copy a small section of the scene and overlap it over the whole of my image, choosing to only add the colour of it to the texture that I already had made.

This is the photoshop file for a barrel in my scene
What the UV map looks like after importing my handmade texture for my robot

To apply a texture to the 3D model I simply opened up my hypershader window, created a new lambert, gave it a relevant name and in colour added a file instead and then included the image that I wanted to use. After that it's just a matter of dragging the chosen lambert and dropping it onto the model you want to texture!

I only did that on the very complex and important models however as this was a very lengthy process, there are also other ways that i textured my assets within my game. One way was to select certain parts of the UV map and drag and drop a texture to the selected polygon faces, this way you can include more than one texture for the model and assign them individually. I used this method for models such as the boat, where the UV map was pretty fiddly but I only had a couple of differences that I wanted to be shown. 

Another method is tiling, either tiling just one image for the whole model or for the certain parts that you've chosen. By expanding the UV map over the image the image with then start to tile across the whole of the model which has turned out to be an extremely handy technique as at the very start I was trying to tile textures by hand which took a very long time! You can also make the UV map smaller to make the texture larger on the model and more detailed.


I made plenty of trial and error mistakes during this texturing process, including forgetting for a very long time how to automatically unwrap UV maps so whenever I textured them the textures would end up looking extremely stretched and unrealistic.
How textures were before automatic unwrapping
But once I started to understand the texturing processes above I found creating my own textures a very enjoyable task!

Creating Flyby Camera 
When I was happy with how everything looked in Maya I then imported it all into Unity using File > Send To Unity > All. To my horror it all came in as a greybox! But luckily the UV maps all kept their position and the reference to the textures were all there, all I had to do was import my image files and drag and drop them to the right components and it was all textured again in no time. Phew!


Now it was time to create the flyby camera in Unity to whizz around my scene, but first, I still wasn't happy with the way it looked. It still didn't look like it was underwater to me so I added a water ripple asset from Unity Standard Assets to sit on top of the rocks so that the camera to fly down through the water, emphasising that this was a sunken ship, as well as some lights around the scene to make it look more blue. I added a light above the water ripples which was a light blue colour which shone down on the scene and some blue and green lights dotted around the battle arena. This now made it look a lot more scenic and gave it the Rapture feel from Bioshock that I originally wanted to include from my moodboard.

For the flyby camera I selected the main camera which was already within the scene and opened up the animator window, I could then use keyframes to change the cameras position and rotation around my battle arena at different times so that it could animate smoothly around the whole arena. Because my sunken ship is the most detailed object within the arena I made the camera pan slowly around and over that and then back around the whole arena to end up facing it straight on.

Overview

Overall I'm very happy with what I was able to achieve. I was very worried about the texturing of this arena after I realised that I had overcomplicated a lot of the battle arena assets as we're not make characters until next term but I had already attempted to make one, my little robot. But I was determined to make it work and make the underwater scene become something that I'm proud off and I think all of the hard work paid off in the end! I am still not too happy about the surrounding area of the boat, I was hoping to create perhaps squid tentacles coming out of a crevice and other things but in the short time that I had I had to make it a lot more simple than I originally intended. There are also still some textures that I feel need to be tweaked as I can see that some of the objects have parts of the texture that still stretches out.

"Coma" Walkthrough Game - The Creative Process

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!



Popular Posts

Follow me on Twitter

YouTube Channel