Machinegun's fire sound mess

Started by
3 comments, last by canary40 12 years, 10 months ago
Hi, I am working on 2d RTS and it has many machines, armed with machineguns. There is a problem, that I didn't expected and can't solve it yet. When few machines are firing at the same time, for example 9 machines, sounds make a total mess. What I hear is a brum. The more are MGs, the worse it is. I tryed to make it in 2 different ways:

1. Each bullet has a sound when it is fired if the mouse cursor is close (at distance X). That is once per bullet.

2. The mouse cursor plays sound (only one at a time) when it is close to the bullet when it was just fired. That is once per bullet too.

Also the sound in these both cases is lowered when the mouse is in range X+n. I watched many games and still can't find a way to solve that. I am using gamemaker if that is important.

Advertisement
Set a maximum of number of equal sound effects that can play at the same time? if you, for example, allow for 3 machine gun sounds at the same time it should still give a nice effect of multiple weapons being fired.
"Rodimus and Unity" - My developer journal
Thank you, that is good idea.
For a machine gun playing a sound per bullet is a bad idea and is just going to lead to a mess; better to use a looping sound which you start playing when the gun starts up and stop when it finishes firing (some volume roll off might be a good idea here as well).

You'll probably still want to limit the number playing, best to experiment here, but this should give a better sound.
In a game I made, I also found that when playing a sound many times can get really messy... it might be because of the limited number of sound channels and once those channels are all used by other sounds (the other bullets in your case) then something strange happens when you try to play a new sound... Limiting the number of bullet sounds seems to be the simplest solution as said by #2

This topic is closed to new replies.

Advertisement