Monday, 27 April 2015

End of Semester 2 Summary

BLOG NAVIGATION


As this is has bubbled into a rather large Blog over the course of the past year this final post has been made in order to make the whole thing easier to navigate.

All posts have been arranged in an orderly fashion within different labelled pages (as seen in the image below), each showing posts relating to specifics of the project.

Please click on some pages and enjoy the ride ;)

Each tab relates to different sections of project development 



Wednesday, 22 April 2015

Game level Complete !

More searching for the issues surrounding the maximum amount of channels that could be used resulted in little findings so after speaking with my supervisor I looked into the voice limiting option within UDK. I went through each of the sound cues which were created and edited the properties to define the maximum amount of instances of each cue could play at any one time. This was a last effort to try and get the level working outside of the editor.

Voice limiting option (Max Concurrent Play Count) was somehow overlooked earlier in the project phase


Before trying again to package the game I got a response from one of my posts on the Epic Games forum which shed some light on the problem. basically I had changed the max channels code for the editor only which would not transfer over to my packaged game. The following code was added to the BaseEngine.ini and BaseGame.ini files to change the max channels available in the exported game.

BaseEngine.ini which was edited to increase the maximum amount of audio channels available to the game

BaseGame.ini file which was edited to increase the maximum amount of concurrent heard sounds (by the player) 

The level has now been tested on a separate machine and appears to be functioning well, now time for testing





Tuesday, 21 April 2015

Exporting as Packaged exe. File

I was having major issues with exporting the game as an exe which actually runs on another machine. The script compiled fine and the game packaged without any errors but when it is installed on another machine it crashed on start up. Also the UDK front end menu screen still appeared at load up which gives the option for game modes such as 'death-match' and 'Unreal Tournament'. This issue was supposed to have been solved with the creation and scripting of my own custom game mode. My game mode should have been overriding this default menu system and just booting up the level right away.


After some searching though many pages on forums such as the Epic Games Forum the solution was unearthed.

Within the configuration files lines of code needed to be changed in order to bypass the default menu and game system to tell UDK to use my game mode as the default. The map (my level) name also had to be specified before packaging.



The game now works runs on a different PC but the setting that has been changed to increase the maximum channels to 64 has not carried over so not all sounds are playing back correctly. Time is running out fast to get a solution and a game that works as intended, testing of the level should have been finished already.

Monday, 20 April 2015

Performance Issues UDK - Voice handling

Since including the breathing system into the level, sounds are being cut off whilst playing the game. Usually after a few minutes of play there are random sounds which are not playing back.

After running the in game performance check on the audio data it appears that there are now too many voices being used at any one time (limited to 32). After some reading into the UDK manual it has become clearer exactly how the sound is handled by the system. Previously it was taken for granted that if a sound was switched off then it would not take up any voices. This is why there was trigger volumes set up around the level which were designed to manage sounds within their area, either switching sounds on or off depending if the player was in the area. This however is not the case and all sounds are loaded into memory from start up and any sound triggered remains as a used voice. 

Whilst reading into the documentation I found out the the voice limit of 32 can be changed up to 64 by editing the UDKEngine.ini configuration file which can be seen below. This has fixed the problem whilst playing in the editor but following up on some guidance I will be looking into the voice limiting options within UDK as a better solution.


Saturday, 18 April 2015

Player Breathing and Linked to Run Function

The breathing recordings were used to create player breathing cues, initially this is only normal breathing and running breathing. A much more dynamic breathing system is more desirable but at this stage there is little time left to include more at this stage as testing should be under way already.

Inhale and exhale samples were were connected as a continuous sound by using the concatenator node, these were also linked together randomly to add variety to each breath.  

Normal_Breathing to be called when walking

Running breath which is called when character is running

Transition breath is called when the player stops running before returning to normal breath
The system which identifies when the WASD (movement keys) were being pressed was already in place from the previously created crouch function so it was a case of extending this to now incorporate the Left Shift key to trigger the run breathing sound.

When Left Shift + WASD (movement) is pressed the run breathing sound is triggered, after the sound has played it checks to see if the the player is still running and if so repeats the for another breath. If the player has stopped running then the signal moves onto the transition breath before returning to the normal breath.

Thursday, 16 April 2015

Crouch Movement Sounds


The following Kismet sequence was created which allowed me to bypass adding anything into the unreal script to define a sound for when the player is crouch moving by simply using 'Compare Bool' nodes. These nodes give out a true or false signal.

The Kismet is set up so that the Play Sound node only triggers when the crouch key + any of the movement keys are pressed (when the player is moving whilst crouching). Once the keys are released this triggers the Play Sound node to stop. 







Tuesday, 14 April 2015

Player Run Function

By default there is no run function that comes with the UTGame class. To enable such a function was a little more difficult that anticipated. What was required was for the player to be able to run on a key press and to add more complexity to the issue the footstep sounds also needed to increase at the same rate. The unreal script which controls the player speed and footstep frequency had already been highlighted before and so a way to change these values if a key was pressed needed to be established.

After searching through forums the following kismet sequence was found which is set up to allow the character to run with a fatigue system in place. The kismet sequence was recreated but did not work very well. The footstep frequency was not altered and the player wouldn't run very far before returning to a walking pace.  


After spending a considerable amount of time trying to tweak this existing system without any luck I then simplified it as to remove the fatigue section. All that was used was the 'Modify Property' nodes which were originally modifying the property 'GroundSpeed', this was changed to 'MovementSpeedModifier' which was the original property that was changed to slow the game character down via the unreal script. This was just a stab in the dark but worked better than was imagined, the player speed as well as footstep frequency is now increased when the left shift button is pressed along with the WASD movement keys.


The next step is to try and add a sound for when the player is crouched and moving as by default the footstep sounds turn off when crouched.

Sunday, 12 April 2015

Footstep Sounds Update _ 05 Fully Functional

Having now re-installed UDK and got the level back up to speed with a custom game mode running, a revisit on the footstep sound issues was required to get this bit of the game working.

The main problem was to do with multiple materials under the players feet and so confusing UDK as to which footstep sound to play back.

The room where there is water on the floor was looked at first, again I tried to delete all non essential floor materials in this room (which had been tried before). Somehow this time it fixed the problem!
I can only assume that it has something to do with the new version of UDK that was installed. Now the custom water footsteps are being called as intended.

However the other area (within the cave) is still reverting to the (nasty) UDK default footstep sound. To fix this I have now redefined the default footstep sound in my custom sound class as my own sound. Perhaps not the greatest thing to do but it works in the given situation as the cave is the only place in the level were this problem is now happening.

Default footstep is called in situations where the material type under foot cannot be identified. here it is redefined to call my own sound in such situations.

Friday, 10 April 2015

UDK Game mode - Take Two

The last attempt at messing with the unreal script to create a custom game mode resulted in the editor crashing. A more cautious approach was taken this time around and back ups of each edited script has been stored safely in case of any problems.

This time a different GUIDE was followed which allowed me to set up a custom game class within the unreal script. The 'Classes' in UDK which I have come to learn work like a family tree, where there is parent classes at the top which branch out into sub classes or extensions of the parent classes. Take the 'UTGame' class for example (as this was the one I wanted to take parts from) is just an extension of another class stated further back in the tree.

The image below show the folder that was created and the unreal scripts that had to be inside in order to run my own game type.

Custom game mode folder tree

Here is defined what kind of game this is. In this case my game (GaryGame) extends the UDKGame class.

This part of the code defines my game character which extends the UTPawn class. This means my game character has all the functionality of the character in the UTGame mode. The default properties were added which adjusts values from the UTPawn class to suite my game. In this case the double jump function and spawn sound was disabled. This is where my sound class was now being referenced instead of the UTPawnSoundGroup.

This class allowed me to gain all the functionality of the UTPlayerController which enables my character to move around and crouch.

This is my custom sound class which extends the UTPawnSoundGroup, this is where I have now placed my custom footstep sounds.

With this in place I had to let UDK know where to look for my custom class so that the unreal script could be recompiled correctly, this had to specified within the UDK configuration file "DefaultEngin.ini" as shown below.


Now with my custom game mode functioning (AT LAST) the next step is to revisit the issue surrounding the footstep sounds.

Wednesday, 1 April 2015

UDK Game Mode - UPDATE

After reinstalling UDK and trying to open the level, it seems there are some issues with the way my custom sound package is being referenced. None of my sounds are playing back at all!

From what I can see all the work that has been done in the kismet is still there but no sounds are defined within the 'PlaySound' nodes. I have had to re-import my custom sound package and now must try and link everything back together the way it was.