Wednesday 18 April 2012

Hello Everyone! I'm currently coming to the final stages of my degree and therefore the final project I've been working hard on. Here's a little taste of what I've been doing...

Game Idea
You're a spy who's about to be dropped off at an enemy manufacturing building, which specializes in the creation of sneak robots. Much of the area is as you would expect, so you must sneak around guards and areas in order to progress. However, sound-based puzzles are also around, requiring you to pick up objects that make more noise and therefore finding alternate routes to avoid guards who will now here you! Other examples are carrying the right objects to a weighing scale in order to progress without altering the guards, as well as sounding exactly like a guard to fool them! Your mission is infiltrate, rise to the top and blow the place up!

Sample Systems


Footsteps
First of all, a physical material was created which associated a blank .wav file to the footsteps. This means when the physical material is assigned to a texture and placed on a 3D plane, footsteps will be silent. Once the level flooring was built, this physical material was applied to the textures.
To create a new footstep system, a delay system was first created which worked out the time between each footstep to match the speed at which the player walked. By using the “Get Velocity” module inside of kismet, the float value can be used to calculate the speed of the player. The below image demonstrates the maths used to calculate the appropriate delay figure.


The figure is first divided by the default walking speed (1). This means when the player walks forward, the value will be 1. This is connected directly to the volume input of each play sound used for the footsteps, meaning full walking speed translates to full volume, half speed will be half volume and standing still will be silent. To efficiently utilize the delay section of the system, a comparison system is needed. If the raw value was used, standing still would output a value of 0, which is unstable for delay modules. By comparing the raw value and setting static values, this prevents any issues. For moving, 2 values are set for the 2 walking speeds (2). For standing still, the comparison is used to start and stop the delay module (3).

Chatter/Suspicion System
Within the level, a number of NPC’s inhabit the building. These are used to catch the player if they make too much noise. To create a sense of realism, these bots have been given a system which allows them to talk, both letting the player know where enemies are and giving feedback as to the bots awareness of the player. The first system created was within kismet, which triggers a number of sound cues depending on the enemy:

However, the sound cues themselves are programmed to create a conversation flow. By splitting the raw .wav files into sections of a conversation (start, response, end), the sound cue can trigger these together to create a flow. The reason these would be split is to both save on memory and add variety. By doing 3 or 4 conversation starts, responses and ends, there will be a multitude of different outcomes. The sound cue for the first robot on the first floor is as follows:


As noted in the feedback section, I added a suspicion system which gave the player a second chance if they were caught. They way in which this is done is to trigger some dialogue which alerts the player to an enemy suspecting they are there, then a timer is used to see if they are within a certain distance: this gives the player a chance to run away. IF the player is still within the distance, they are killed. Otherwise, the enemy is triggered again to notify the player that their suspicions have been culled. The system is as follows:

Finally, a breathing system was implemented. The way this works is to change the volume of a breathing track to represent the distance from an enemy. The harder they are breathing, the closer they are. The system is as follows:



Pickup System
As this game uses sound to alter the players perception and ultimately lead them around the game, pickups also affect the player. When the player picks up a key for example, a jangling sound will occur when the player walks along. The speed at which the player walks will also affect the volume of this.
Using the same delay used to calculate the time between footsteps, this pulse is used to play a sound cue with that specific pickup sound, which contains a number of sound samples, randomly selected to avoid repetition. Each pickup has a gate attached to it which initially is closed, shown below:
Once the item is picked up, the gate opens. This allows signal from the delay to activate the sound. Once the player places the item correctly, the gate closes again and the sound stops. As the player works their way through the level, they may find they need to pick up more than one item at a time, creating more noise.


In terms of affecting the ‘listening’ distance, another gate is opened when the item is picked up, which adds a set amount to the float value used for calculating distance. This is also affected by the players speed, as shown below:


Obviously, when the item is dropped, the gate closes and returns the distance value to normal.

--------------------------------------

These are just a few of the fundamental systems used to create my sneak game, more will be coming as well as gameplay footage as the game wraps up in development!

Alex (Divitoe).