[SOLVED] Audio Performance (positional entities)

I’d like to have 100+ positional audio entities on my board. They would have a falloff, so you would be hearing one or two at a time. My concern is performance. If there’s hundreds of entities doing a distance check (should I be playing or not), will that kill the CPU?

Our game is on desktop and on mobile.


Hi @Michael_McCarthy,

Doing 100-200 distance checks per frame won’t necessary kill the CPU, but yes it may have an impact, especially on less powerful devices (e.g. mobile).

If your entities are placed all around your board, you may be able to split them in cells. So you detect on which cell the player is right now based on his position and you enable only those audio entities that are part of that cell.

This way you lower the number of 3D audio listeners doing distance checks per frame.

1 Like

Great idea. Disable the entity to avoid the check all together.

1 Like