You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For example during destruction of a large number of entities, a big number of sounds may be played at parallel. Limit the number of sounds started during a single tick (and ignore the rest).
The text was updated successfully, but these errors were encountered:
The obvious approach is to aggregate the sound events over a tick instead of starting playback for each event. The ambiguous part is how to play it back. A naive way would be to average the positions and play the sound once at that point, but that would begin to present problems when there's fighting all around the map, so that wouldn't work. But I think there are some things you could do to avoid the issues.
One way would be to only count the sounds that are currently audible in the player's view. That way the sound would definitely play in a logical area, but it would mean when you pan to another area, no sounds would be playing. Optionally we could keep track of the positions that every aggregated playback instance came from, and adjust the playback based on the average in view every frame, instead of ignoring everything out of view at the time of the event.
An improvement regardless could be to scoop up bunches of the event based on a radius for example, to reduce the density so we have less information to deal with.
For example during destruction of a large number of entities, a big number of sounds may be played at parallel. Limit the number of sounds started during a single tick (and ignore the rest).
The text was updated successfully, but these errors were encountered: