Labels

Wednesday, 7 May 2014

Main and Pause Menu's

Originally the menus for the game were going to be made using Unity's in built GUI system. However this proved to be more difficult than expect and so instead I chose to use planes and raycasting to create our menus. Both the main and pause menus are scripted fairly similar however the pause menu alters the time scale of the game as it has to pause the rest of the game environment where as the main menu does not. Each plane is given a specific name that is read when clicked on by the player. If the name corresponds with one in the script then the code for that action is executed. Below are some screenshots of the menus and their code.

Main Menu




Pause Menu



SFX

I compiled the Sound Effects library over the course of the games creation. Once an appropriate sound is located it is imported into the audio editing software. 

There needed to be no delay before the sound and there could be no silence at the end so the sound clip is just sound. After editing the sounds to the correct length, pitch, volume and file type, they could be exported to unity and coded onto the objects creating the sounds.

in some cases we needed to determine the length of animations in order to line up the clip so it sounds like what it looks like its doing.

For sounds that are often repeated like footsteps, i exported a variation of six different steps that are coded to play along side an animation at random so the same one cant be played twice in a row adding to a more believable world.

It was difficult figuring out where to draw the line between real life sounds and synthetic sounds as the game is a strange combination of both but I believe good results have been achieved. 

After inserting the audio files the most important thing will now be getting the volume levels consistent and correct so all sounds are heard, play and sound as expected

Bug Spray Pose and Mecanim Layers

To implement the bug spray pose into our characters animations it had to be blended in using a animation layer mask. The animation layer mask has allowed me to set it so that when the bug spray is used only the top half of the characters animation will change. This meant that we could keep the pose separate from all the other animations but still use them in conjunction with each other. Little scripting had to be done for this as it was simply adding another element to the animation controller script I had previously finished. Below is a screen shot shower the mecanim animation layers, the animation mask and the final pose in game.


Main Menu UI and Particle effects



While Elliot was set with the sounds and enemies i was given the task of UI elements and particle effects. We needed a main menu/pause menu and various fire/wind/snow particle effects.

I tried to keep with the triangulation theme we have with our game and the three red/blue/green monochromatic colours to emulate the old 'arcade' effect, i reasonably happy with the results although it was hard to determine exactly how it would look in unity until the particle emitters were set up properly by Luke. 

Above in order of appearance:

Particle Effects
- Wind Swirl, forest level and fan puzzle
- Thin Wind, Also for fan puzzle
- Fire, used for the lava effects and torches.
- Firefly (Two variations), for more of a forest ambience
- Longer wing swirl, also for forest level winds and puzzles
- Snow, used for the Ice level snow. 

Menu UI
- Main menu, with the options (Start, Level Select and Quit) 
- Level select leads to the forest, ice, fire selection
- Pause menu will use Resume and Quit. 

Extras
- Custom mouse cursor (with glitched effect)
- Un-used pixel art snowflake (Didn't use because we came up with the idea of doing more 'triangulated' theme with the assets and particle effects)


Implementing Audio

Once we had a library of sounds the next thing to do was to begin implementing them into the game. For most of the elements that required sound it was simple to implement. This was due to only having to add a few lines of code to existing switches to get the sounds to also play when an event was triggered. However for the background ambient sounds and game music the scripting was slightly for complex as it required each audio clip to fade out or in depending on the level that you are in. Below is a screenshot of the audio sources for the music and ambient sounds.


The code for the music and ambient sound was however still fairly simple. Each audio clip has their volume interpolated to a set target which occurs when the player enters specific trigger points. Below is a screenshot of the script for the sound transitions.



Bug Spray

The Bug Spray is an item used by the Playable character and is required when removing glitches from enemies, based on a general kitchen cleaning product, the sillouette is easily recognisable, I imported a reference onto an image plane and modeled the basic shape around that in the side views. 
the model is a simple mesh with triangulation and block colours. Given to Jez in order to be incorperated into a character pose when the bug spray is in use.

Throughout the creation process, i used mental ray to render images just to see how the shape and colour would look as a final outcome.



Reference



Tuesday, 6 May 2014

Enemy Visual Bugs

As an extension to the pre-existing enemy bugs it was decided that extra specific bugs would be added to the enemies. Each of these would affect a different aspect of enemy, we decided that these elements would be: scale, speed and the colour. For the scale bug the enemies would simply be twice their original size. The speed bug is used to alter the enemies speed, this can be used to make it really fast or stop completely. As the enemies speed changes its animation will also seem out of sync with the enemies movement speed which adds to the visual effect of the bug. The colour bugs simply causes the enemies material to flicker a bright pink colour, similar to the typical missing material colour. Below are screenshots of these bugs working in the game.


The speed bug was achieved by simply altering the speed variable on the enemy AI script attached to the enemy. The scale bug was also fairly simple and was achieved by just altering the enemies localScale property. The colour bug however was slightly more complex due to the flickering effect. This was achieved by creating a random number between 1 and 0 and if it was greater than 0.7 the enemies material colour is set to the new pink colour. As this occurs every frame this results in a constant random flicker. Below is a screenshot of the code for these bugs.