One aspect of Hevn that is very important for immersion is the audio and sound effects - specifically the "muffling" of sounds. By "muffling" I mean adding a low pass filter to an audio or sound. If you're unfamiliar with what a low pass filter does, imagine listening to music playing from a separate closed-off room from the one you're currently in. The lower frequencies (i.e. bass) can be heard through the walls while the higher frequencies are attenuated, or not heard as clearly. In this post, we'll discuss how this is currently handled in the game.
Before getting into the details of how we're applying low pass filters to various audio sources, I thought I'd share a short video of how it currently sounds in an early test scene in the game. Note you may need to turn the volume up a bit for it to be heard properly. Also please disregard the extra mouse pointers.
A few things to listen for in the video:
There are several cases where applying a low pass filter on an audio source is ideal:
Audio Manager and Layers
Currently the AudioManager component is responsible for several things:
With every AudioSource and filter associated to a layer, we're now able to plug the AudioManager into the existing custom CullingManager to essentially enable low pass filter's according to the player's location, attribute state, and contents of the player's inventory (i.e. is the player wearing a helmet).
When the player leaves the outdoor space by opening a door and entering a room, the appropriate low pass filters kick in and gradually decrease over time as the door closes. While indoors, if the player equips a helmet, the low pass filters for both the outdoor and indoor sounds will be filtered as well. At this point the only unfiltered audio is inside the player's helmet (and narration if it's playing). The opposite happens if the helmet is opened.
Hopefully this helps to make Hevn that much more immersive. Until the next post, thanks so much for reading! Much appreciated!
More game design details at IndieDB