Thursday, February 01, 2007

Sound in Torque

We have been able to get background music to play in our game by adding code to the mission.cs, game.mis and audioProfile.cs (client side) files. Torque supports .wav files and once we are able to get some background hospital noises in .wav format we will be able to have them playing and looping in the background of our game to add to the atmosphere.
Also, after a fair amount of coding and testing we have been able to get audio emmiters working in our game. Apparently these emitters in Torque have a history of not working but after a bit of tweaking the code we've got them functional. Audio emitters make use of the audioProfile.cs file on the server side. What an audio emmiters does is play a sound in a certain area of the game world. You can adjust the position and scope of the sound. eg. We can now place a model of a hospital machine in the game and add an audio emitter to it so that if the player is standing near the machine he will hear it beeping beside him but as he distances himself from the machine the sound will fade and eventually being inaudible.
Our next step with sound is to get triggered sound effects playing.
We have also gotten our in game triggers to work so that you automatically switch from 3rd person view to 1st person view and back again upon entering and exiting the trigger. We are considering using this to overcome the problem of the doctor model blocking the view of the patient as he approaches him.

0 Comments:

Post a Comment

<< Home