OpenLoco v24.12 is out! This release mainly focuses on bug fixes, but there’s some exciting changes under the hood as well!

For a complete summary of changes, please find the OpenLoco changelog on GitHub.

Jukebox rework

The Locomotion jukebox features various tracks for the game’s different eras. These can be played in their original order, but you can also make your own playlist. There was an edge case, though, where a playlist with your one favourite track would stop playing after that one track! Fed up with this, new contributor @LeeSpork removed the cause in #2750. Moreover, he refactored the jukebox code, so it now lives in its own compilation unit in #2771. Nice work!

Paint interop removal

The game’s various drawing routines for rendering the world viewport, called paint routines, have all been implemented as of last month. This marked a huge milestone for the project, and while it is still early days, we’re already seeing the first benefits: we were able to drop all the so-called interop code from the paint namespace. This code was used to interface between the vanilla Locomotion game and our implementation while not all paint routines had been implemented in C++. As of #2772, this could all be removed! Not only does this make the code quite a bit cleaner, it also paves the way for more advanced rework in the future, such as multi-threaded rendering!

Train collision detection

When do trains collide with one another? The question may seem obvious to us, but due to how the game engine works, collisions have to be implemented explicitly. In #2587, @duncanspumpkin unravelled how the vanilla implementation works, and reimplemented it in C++.

While it should work as before right now, this implementation will allow us to improve the behaviour in the future. For example, right now, road vehicles can’t collide with track vehicles! While vehicles clipping into one another may be interesting in its own way, it doesn’t make for a very realistic simulation…

Vehicles not producing sound

Something that has puzzled some players for a while, is that various custom objects would not produce any sound effects. It turns out their frequency specifications were zeroed out, which in DirectSound had the effect of disabling direction-based frequency shifting. In 2022, we moved to OpenAL as the audio backend, so this niche feature no longer worked, and in fact muted the sound effect completely! As of #2806, we now mimic vanilla behaviour by disabling the frequency shifting for small frequency values.

Further demystifying of the company AI

Resident wizard @duncanspumpkin has been working on further demystifying the company AI by reimplementing more parts of it in C++. In #2783, we figured out how AI allocated tracks are removed. This is basically the equivalent of the ‘ghost’ elements used by human players, but can stick around for much longer. Further, in #2789 a similar thing was reimplemented for track signals.

While you should not see any difference in gameplay yet, understanding how the current AI works paves the way for future improvements, so this is all very exciting!

Crashes after moving your Locomotion install

Remember how we introduced having multiple locations for objects a few releases ago? Well, it turns out our new code didn’t like people moving their Locomotion install. This doesn’t happen very often, realistically, but caused an unexpected crash for some players. After figuring out what went wrong, @duncanspumpkin patched this nicely with more flexible (de)serialisation of the object index in #2761.

Bug fixes galore

It’s hard to crunch out a bunch of code without introducing a few bugs along the way. Thankfully, @duncanspumpkin found some time to fix a bunch this month.

Let’s start with #2782, which fixes issues with bridge painting. In the last release, people quickly noticed something we missed, which is that some bridge pieces were missing their railings! Having penned the code responsible, Duncan quickly fixed the issue.

Some players noticed that the same name would show up for an industry, and some industries would not be named at all! This took a bit of digging, but was ultimately fixed in #2798.

Another issue was that people lining up for a tram or bus stop would all show up in the same colour! This had to do with what we internally call the cargo density — and yes, people are considered cargo too, in this game… A quick fix, thankfully, so patched as of #2799/

Finally, it was brought to our attention that the sound effect being played for company bankruptcy has been inverted! This meant the ‘crowd’ would cheer insted of boo your company when it goes out of business. It’s a simple mistake, with amusing consequences. With #2800 in, the right sound effect is played once again.

Updated: