Limiting audio voices

Discussion and feedback on Construct 2

Post » Sun Jun 25, 2017 9:46 pm

Some feedback I got from a player,

"When shooting through a lot of destructible blocks, whatever's generating the sound effects seems to get overloaded and just makes the sound cut out. This only happens for this game on my computer. It gets fixed upon restarting the game, but it occurs again pretty quickly on any level with a lot of destructible objects."

I had a look and I can't seem to find an in-built way to set a limit to the number of voices played through a tag. Is there a way to set a soft limit to just kill voices until there's space instead of overloading the system like this?
B
44
S
13
G
8
Posts: 622
Reputation: 7,417

Post » Sun Jun 25, 2017 10:01 pm

Well you can't limit how much is being played in a tag.
You can only limit how many tags are playing. Its up to you what tags are called.
There are several ways to do that, but the simplest would be to implement a counter, and compare its value each time you want to play something.
Then subtract from that counter when the sound ends.
Image ImageImage
B
169
S
50
G
174
Posts: 8,331
Reputation: 110,806

Post » Sun Jun 25, 2017 10:05 pm

newt wrote:Well you can't limit how much is being played in a tag.
You can only limit how many tags are playing. Its up to you what tags are called.
There are several ways to do that, but the simplest would be to implement a counter, and compare its value each time you want to play something.
Then subtract from that counter when the sound ends.


I'm using hundreds of tags to modulate the pitch of sounds being played back, like "gunshot", "aiMoveRight" etc
B
44
S
13
G
8
Posts: 622
Reputation: 7,417

Post » Fri Jun 30, 2017 3:39 pm

There is a cool vid on YouTube by the blizzard programmers responsible for the audio priority engine in Overwatch.

They are doing it primarily for game play reasons. i.e. priority and attenuation of audio for dangerous enemies close by. Almost total muting of audio that does not convey important information to the player. etc But the same can apply for performance or interference / distortion reasons.

If I recall they have a number of tags on each audio object , all the sounds are queued into the audio engine. the audio priority engine then decides on a player by player basis what are the most important sounds for that player and then the respective triggers and other data are sent to the client.

Im sure we could so something similar on a smaller basis for our games.
i.e. give all the sounds a priority number, que the sounds then play / attenuate only the 4-8 sounds with the highest priority at that time for the player. I will probably try something along these lines.
...
B
45
S
23
G
7
Posts: 291
Reputation: 8,020

Post » Mon Jul 03, 2017 9:53 am

NetOne wrote:...


Yeah I mean that's all pretty standard tbh I just don't think anything like that is possible the way the tag system is integrated. If you can't limit voices per individual group of sounds, it leads to all sorts of issues. What I've ended up doing is coding in stuff like, timers on everything that's destroyed and emits a sound to make sure it only plays the noise if there's only been a certain amount generated within a threshold. Which is a real round-about way of doing it.

In Wwise you can just limit voices locally or globally per sound or container instance. Something like this would go a long way.
B
44
S
13
G
8
Posts: 622
Reputation: 7,417


Return to Construct 2 General

Who is online

Users browsing this forum: mihirolover, Refeuh, technofou and 14 guests