Dynasty has been in development for quite some time now (more on that in another post), but I haven’t tackled the creation of an atmospheric soundscape yet. It’s time to change that!
When we generally look at the soundscapes of other games, the soundscape can be divided into two areas:
- Sounds that originate from sources directly near the player, for example, the hum of a refrigerator and the dripping of a faucet when the player is in a kitchen. These noises become louder as the player approaches the corresponding objects.
- Generic sounds without a direct source, randomly played and unlocatable for the player, for example, bird chirping or rustling leaves in the forest.
For the development of a soundscape for Dynasty, we are focusing exclusively on point 2, as sounds can already be played from blocks and items. For this purpose, a generic sound engine must be implemented, which includes the following features:
- The engine must be able to determine in which environment the player is currently located, e.g., forest, cave, or underwater.
- Sound playlists must be created from which the engine can draw depending on the current environment.
- Sounds from the currently active playlist must be randomly selected, played, and varied (volume, pitch).
Environment Detection
And right at the beginning, the toughest challenge awaits. Typically, games use predefined zones to recognize the player’s environment when entered. Soundscapes, camera effects, and lighting settings can be easily controlled this way. Problem: Dynasty has a freely changeable world, predefined zones are impossible to define. We need a more dynamic approach.
What if one could recognize based on the blocks surrounding the player in which environment the player is likely to be? If the player is surrounded by many leaf and wood blocks, he is likely in a forest; however, if there are significantly more stones and no plants present, he will be in a cave. I leave it to your imagination to think about how one could define an underwater or meadow environment 😉
Even better is not to let the engine define the affiliation of a block to an environment, but the block itself. Blocks have an already implemented and optimized tag system, which can be reused for this purpose.
So if we define a cave environment so that the player must be surrounded by at least 100 blocks with the “Tag_Soundscape_Cave” tag in a small radius, we only need to assign this tag to the corresponding block types in our database. Modders will also be happy later on.
Sound Playlists
Now comes the fun part – listening to hundreds and thousands of sounds from sound libraries and picking out the most interesting ones for the respective environments. For my part, I can say that I can now literally taste sounds. A big kudos to all those who do this professionally.
As expected, the selection of sounds is not enough. Since these come from different sources, they often need to be heavily processed. Especially volume and background noise, but also reverb or pitch, need to be adjusted to the target environment.
Play
The final step. Since the soundscape engine now knows in which environment the player is located and which sounds are available for selection, all that remains is to calibrate how many sounds should be played in what time and with what volume and pitch. But instead of a text-heavy description, let’s have a listen.
Even with just a few simple sounds per environment, each one immediately feels much more appealing and believable. It’s important that the noises are subtle and not too intrusive. Also, reverb effects in caves, as well as in forests, make a huge difference.
Time for a beer. I’ve earned it for developing, and you’ve earned it for reading!
Leave a Reply