Try out my sound engine here!
Hiya Devs!
I’m currently trying to make a sound handler for my new game, but I want sound to bounce off and (if possible) diffuse through walls like in real life.
This is very crucial for my as sound will play a big part in it.
My inspiration comes mainly from Rainbow 6 Siege, as the audio engine in that game is very good.
Also, if you’ve never watched a Smarter Every Day video, and you’re interested in Sound, check out this!
You can determine if audio is above or below you as well as follow audio to arrive at it’s location - even if it means going in the opposite direction - up a flight of stairs and through a series of rooms.
Version 1:
The red block represents where the sound comes from when direct sight to the origin of the sound is lost.
It uses the Path-finding service to determine the closest route to the player, then plays a lower volume version of the original sound at that point.
As you notice though it doesn’t handle sharp changes in the closest point very well - as you can see around 0:13-0:16
I’m kind of stuck on how to sort this issue. I’ve tried making multiple sounds but that causes poor performance and syncing issues.
Any suggestions or insights would be appreciated!
EDIT: Version 2!
This version better simulates where sound is coming from, and you can even trace back a sound to its origin through a complex maze!
It is also a lot more robust than the first version, with no syncing issues, replication problems between multiple clients and it is modular enough to handle multiple sounds from different directions at the same time.
To do:
- Test the simulation works on multiple level buildings
- Test in cramped spaces
- Implement hi/lo pass filters depending if the sound is above or below your character (reverberation through floor)
- Thoroughly test performance impact (this may be the only downside to this version)