What's the best way to handle these Sound effects?

I’ve been looking for ways to optimize my game and I noticed that when certain audio files are played, the script that played them spikes to over 7% usage in the Script Performance window. These audio file are over 5 minutes long and contain over a hundred different sound effects each, with each effect being separated by a few seconds. My game has 7 of these files in total, adding up to over 800 different sound effects.

When a player activates a specific event in the game, the script locates a start and end position within the audio file for the corresponding sound effect. This means that they only hear a single effect as opposed to hearing the entire audio file.

I originally set it up this way because I assumed that fewer audio files would mean the game has fewer SoundIds to load from the website, and therefore it would be more efficient. However, as I noted before, there has been a significant lag spike whenever a sound effect is played.

Testing a sound effect in its own audio file, about 1 second long, caused no noticeable spike in usage in the Script Performance window.

Would it be better to keep sounds grouped together as much as possible to reduce the amount of files that need to originally load, or would separating the effects into their own Sounds, each between 0.5 and 5 seconds long, be more efficient?

Thanks!

3 Likes

Being their own sounds would be better for performance, but way more expensive.

2 Likes

Yeah, I have had this issue too and I am not sure what to do either.

By more expensive, do you mean in terms of the cost to upload all of the audio? I’m willing to do it as long as it fixes this issue.

In terms of Robux.

Honestly, I really REALLY hate how Roblox charges for sounds. It limits so much of design it’s unbelievable. I don’t have infinite Robux to throw around.

1 Like

Yup.

Finished preparing 869 audio files: I uploaded around 15, and then got a 1-day ban. It seems like I’m going to lose a lot of Robux from denied audio and I’ll get banned multiple times for this.

I’m not sure where to proceed from here. Separated audio files are infinitely better but the moderation process is making it seemingly impossible. Help.