How We Create Sound In Train Life!

Train Life: A Railway Simulator

For the first time in railroad simulation, play as both the driver and company director! Take the controls of your locomotives and grow your railway empire by negotiating deals and developing your network.

[h3]Hello Engineers![/h3] Welcome to one of many more to come: Dev Blogs for Train Life! In this short read we will talk about how we create sound for our game! We feel that sound is not talked about enough, and it plays a crucial part in Train Life - in any video game, for that matter. With that in mind, let's get into it! [h2]Placing Sound FX [/h2] Placing sound effects in a game seems like an easy task. The Sound Designer puts them as fixed-point sound sources on the levels and sound effects play when triggered (either once or until they are stopped). But it is a challenge when we have to face a huge map like Train Life has. [img]{STEAM_CLAN_IMAGE}/41001365/846bc92fbf1254b1a396bc65e15f431a26934107.png[/img] One of the first problems we encountered was the density of sound sources. In places where we wanted players to hear the constant sound (like forest ambiance), it was hard to decide how far the sources should be from each other, both in audial and optimization cases. [img]{STEAM_CLAN_IMAGE}/41001365/1a5f824cc10373e3886aaad57e193f5e8588c0e1.png[/img] Luckily, we came up with a tool to place sounds in special areas that can be modified by desginers. [h2]Developing Tools[/h2] Once a player enters the area, the sound source glues itself to the player and follows them. After leaving the area, the source still follows the player but is limited to the area's border. This allowed us to easily create ambient sounds in huge spaces (like forests, cities, or plains), as well as in smaller places (like industries). [img]{STEAM_CLAN_IMAGE}/41001365/a027effce3e9ded1f04bea8cc4628c77293cc232.png[/img] We developed a variation of this tool for randomized sounds that play once per time, like birds or sirens. The method of placing this tool is the same as for the previous one, but it works differently. It randomizes a location of where the sound should be played (whether on the border of the area or inside it) and designers can specify min-max values of how often the sounds should be spawned. But that's not all. You must have noticed that when you enter tunnels or bridges, sound changes a bit. We add reverb specific to those places or, in the case of tunnels, we mute some of the sounds. [img]{STEAM_CLAN_IMAGE}/41001365/7c7f145a307d57d19fcb234540d2ce1e30353677.png[/img] When implementing those effects, the sound designer's first thought might be placing collision boxes, triggering the effects on entering and removing on exiting. However, the change would be immediate, and we didn't want it in Train Life. That's why we created a special kind of collision box that changes the strength of the effect based on where you are in the collision box. Thanks to that, the effect is not independent of the trains' velocity. [h2]Usage In-Game[/h2] Although those tools speed up the process significantly, it still takes a lot of time to place them. They make it easier to see what type of sound is where and what sound line or zone needs to be adjusted if a level changed, but an empty level, especially a detailed one, needs days to be considered completed. Nevertheless, they allow us to quickly create soundscapes in big areas, giving a solid background for places that need more detail. [img]{STEAM_CLAN_IMAGE}/41001365/bbb76f69854e0ca87f1e75b51cdaa11716a92a96.png[/img] A big shoutout to our sound designer Greg in writing this blog! We hope you all enjoyed this informational blog post and make sure to follow Train Life on [url=https://twitter.com/TrainLifeGame]Twitter [/url]and join the official [url=https://discord.gg/DUnX4m9WAY]Discord channel[/url] to stay up to date with the latest and greatest news from our teams. Until next time! Mike Train Life Community Manager