Game Development Community

Sounds don't play (kinda)

by baylor wetzel · in Torque Game Builder · 12/11/2007 (9:41 am) · 1 replies

Can anyone explain to me how the sound system works wrt number of sounds?

i have a hostage rescue game where the terrorists and counterterrorists fire their guns at each other every 200ms (done on a schedule). A projectile flies, muzzle flash goes off and sound plays (single WAV file/audio descriptor). Works great with two agents but if i do 8 on 8, the sound play intermittently (projectiles and muzzle flash continue to work fine). i shrank the WAV file (play time), played with the schedule time and added some randomness so they don't all fire at the same time. Makes it better but not good. Oddly, a single agent firing with a for loop and schedule does seem to work OK. Haven't figured that part out

Right now my options are to slow the machine guns down (which looks unrealistic), reduce the number of agents (which would break this particular game), remove the sound (which is probably what i'll do) or make a fake "lots of guns firing" sound that will play independent of the actual gun firing (cheesy hack but might not be noticed by player)

Any ideas on what's happening here? Am i doing something stupid? Is this a technical limitation of the sound system? Is there some work around (fewer sounds, smaller WAV file, different WAV files, config file change, etc.)?

#1
03/07/2008 (6:03 am)
Hi Baylor, I am having a similar problem with our current game. We have quite a few entities on screen, and to them I have a audio emitter behavior attached. This can cause some sounds not to play sometimes. Also, like you, we have a machine gun weapon that the player wields. Too each projectile (bullet) I have a "Emit sound on spawn" behavior attached, so it will alxPlay a AudioProfile when the bullet object is cloned. Sound definitely do not play in this instance. In my case, it seems like its a problem with the same profile being reused before the previous usage has completely finished.

I plan to look into it more soon, as we want to gear up for release soon.

Another thing you can try is breaking up your AudioProfiles to use more descriptors. I was lead to believe at some point (either documentation, of which there is little for the audio system) or a post here on the forums that AudioDescriptors are basically sound channels - though, someone correct me if I am wrong.