I am creating an RTS game in flash, AS3 for the Epic Flash Game design Contest http://www.youtube.com/watch?v=bpFBraUbHyo&list=UUfkxvxrvpNxXvdKusYS0NfQ&index=1
Am almost done, except that creating the class which manages all the sounds is being quite a pain. Basically there are only 32 available SoundChannels for AS3 before the buffer overflows. But unfortunately, my RTS handles several dozens of units fighting at the same time, and each unit, especially rifle soldiers fire multiple shots at a time.
If I let each sound effect be sounded, the buffer would overflow, even if it does not, it would sound very noisy and messy. so the question is, I have seen games like starcraft in the market where there are hundreds of units on screen, yet the sound is pretty "unnoisy" and organised. I would like to ask how those people achieved this effect? What sounds do they accept or filter out?
Currently I have 3 possible models: 1)First in, first out model: Accept all sounds being played, but as soon as the buffer limit is reached, the earliest sound in the buffer is silenced.
2) Accept or reject model: Accept all sounds until the buffer overflows, then reject all further plays until sounds end and the buffer empties.
3) Loudest only model: Currently my game has a variety of sounds of different loudness, for example, explosions are louder than gunfire effects. In this model, the loudest 32 sounds are being played, if a sound enters which is among the top 32, the lowest of the 32 is "kicked" and the sound replaces it.
Which model is best, or perhalps you can suggest your own model =p.