New year, new OpenLoco v25.01! This release mainly focuses on implementing AI functions and reworking the UI! There is also a new OpenGraphics vehicle, the ‘Class 656E’!
For a complete summary of changes, please find the OpenLoco changelog on GitHub.
Implementing AI functions
Locomotions AI doesn’t have many fans, due to some of its odd ways it plays. Before we rework it though, we need to first implement the original AI, warts and all. I focused on AI this month with a bunch of pull requests (#2790, #2793, #2848, #2807, #2808).
The functions that were implemented were mostly associated with deciding where to place stations/docks/airports. It’s interesting to see that the AI will make a guess at the expected profits on a route before deciding to build it. There is still a good chunk of AI functions left to implement, but they are all nicely contained, which makes it much simpler to work on. Hopefully, this year we can finish off the vanilla AI and start working on a replacement.
Implement Boat Path Finding
Another area that many people have complained about is the boat path finding. This month, I went and implemented it (#2838). It’s not at all complex and even has a few bugs in it. The jist of the code is that it will search in a 15x15 grid centered on the boat for a path to the destination. That means that only small obstacles can be navigated around! In addition, there was a bug in the original code that meant that the furthest extents of the grid may be incorrectly marked as occupied/unoccupied by other boats. This has been partially fixed (they are all considered as unoccupied).
Overall, the path finding code is very inefficient and could easily be improved without changing the resultant route (but I guess the community actually want a good path finder instead). If anyone in the community wants a go at improving it then feel free to get stuck in.
Reworking the UI
This month, @ZehMatt and @AaronVanGeffen have been working on improvements to the underlying mechanisms of the UI (#2809 #2841 #2851 #2852 #2854 #2856 #2857 #2860). The main area of focus has been making the window widgets work a bit more logically. The ultimate aim is that windows can automatically layout the widgets instead of us having to manually position them. Working out the position is time consuming and error prone, but it will improve consistency across the game.
@ZehMatt also made a number of improvements to the performance of the render engine, so expect much better frame rates this release (#2824 #2827 #2829 #2830 #2831 #2835 #2837 #2855).
Swedish Translation
@slicke contributed a Swedish translation #2816. It’s great to see more languages being added to the game. If you aren’t a native English speaker and want to help out, there is plenty of room for further translations.
New OpenGraphics Vehicle
New contributor @Phosphorus551 created a vehicle for OpenGraphics, the ‘Class 656E’ #11. This is the replacement vehicle for the ‘Class 656’. @Phosphorus551 has also been working on another vehicle but it wasn’t complete for this release.
I should probably get around to making my basic asset pack support that I promised last year…