Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1075932 Posts in 44152 Topics- by 36119 Members - Latest Member: Royalhandstudios

December 29, 2014, 04:13:51 PM
TIGSource ForumsDeveloperTechnical (Moderators: Glaiel-Gamer, ThemsAllTook)How to Best Handle Large Numbers of 3D Sound Effects?
Pages: [1]
Print
Author Topic: How to Best Handle Large Numbers of 3D Sound Effects?  (Read 402 times)
SynthesisGame
Level 0
**


View Profile
« on: June 24, 2013, 08:01:35 AM »

My game (C++/SFML) has a short sound effect used, with 3D positioning, but it doesn't sound good when the number of instances gets high. I think because it happens so often, that it will trigger on several update cycles in a row (60/sec) and get this sort of regimented feel rather that immersive.

Picture a space battle with hundreds of lasers being fired all around, that is basically what I am trying to make work. Anyone have any tricks? What are the standard methods to deal with this type of thing? We are talking 3D flybys with very clear visual cues. It makes it more complicated than just swapping in sound files with multiple lasers recorded, but maybe I need to create a complex swapping system?

I have tried limiting the number playing at once, swapping in closer sounds for farther ones, lots of combinations. It did not help, lower limits and you start to notice the swapping, or notice visuals with no sound effect. There could easily be a hundred events per second occurring in close proximity, so it is presenting a challenge.

Any ideas or resources are appreciated!
Logged
ThemsAllTook
Moderator
Level 10
******


Alex Diener


View Profile WWW
« Reply #1 on: June 24, 2013, 04:34:24 PM »

Sounds like this might be more of a design problem than a technical one...or are you running into technical trouble with playing that many sounds at once? Which audio API are you using?

You might be able to make it sound more organic by randomly varying the pitch of each sound you play. Random tiny delays before each one plays (really tiny, don't want to introduce unnecessary latency) might help too? Multiple sound samples for the effect that are chosen at random would be another thing to try.

Picture a space battle with hundreds of lasers being fired all around

Lasers are silent, and sound doesn't travel through space. I'm picturing silence.

...sorry, couldn't resist. Grin
Logged
SynthesisGame
Level 0
**


View Profile
« Reply #2 on: June 24, 2013, 05:12:53 PM »

I am trying to tackle it as a technical problem. I like the effect I made for it, and it works well on a small scale. It is the 60hz update cycle that is killing it.

SFML has a wrapper around OpenAL Soft.

I like the idea of the random small amount of delay. Should be easy to do by jumping ahead in the file a bit. I think I will try adding 1/60th a second of silence at the start of the file and set it to start randomly somewhere in that silence. I will try throw in a bit of pitch randomization too and see what that does.

Ha yes, I agree 100%. To bad for me though, that they aren't actually lasers, but that is the feel I am trying to get across. It's actually a sound effect for pseudo bonds forming or breaking, but I want it to have that space battle vibe.

Thank you. I will report back.


Logged
SynthesisGame
Level 0
**


View Profile
« Reply #3 on: June 24, 2013, 05:52:27 PM »

Wow... I'm amazed how much of a difference that made!

I used a random delay of up to 1/60th of a second and a randomized pitch shift of up to +/-10% and it went from a dead regimented sound to pure chaos! Amazing!

Thank you very much. I think I have to go back and apply this to all the sounds in this and a few other projects as well!
Logged
ThemsAllTook
Moderator
Level 10
******


Alex Diener


View Profile WWW
« Reply #4 on: June 24, 2013, 06:16:37 PM »

Cool! I'd like to see the results if you have the means to post a video or something. Smiley
Logged
SynthesisGame
Level 0
**


View Profile
« Reply #5 on: June 24, 2013, 07:44:24 PM »

It's actually a really hard game to capture as it uses vector graphics and no anti-aliasing or bloom type effects. I am trying to figure out the best way to handle that, but anything other than a zero loss format at native resolution kills it. I have test posted on YouTube trying a bunch of zero loss codecs and it is really not flattering at all compared to how it looks when running, once YouTube compresses it.

I am planning on releasing an alpha in about a week. I have spent the last few months working on nothing else. I am really curious about what sort of reception it might get. I can definitely post it in the feedback section here once I have enough time to be able to reciprocate.
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic