OpenLoco v24.11 is out! In this release we’ve added our initial OpenGraphics objects, finished all of the ‘paint’ code, and fixed a bunch of bugs.
For a complete summary of changes, please find the OpenLoco changelog on GitHub.
Assorted bug fixes (#2623, #2676, #2678, #2690, #2691, #2708, #2717, #2721, #2723, #2726, #2729, #2731, #2732, #2735, #2752, #2770)
It’s been a real bumper month of bug fixes. Myself, @LeftOfZen, @AaronVanGeffen and new contributor @LeeSpork all fixed a bunch of crashes and bugs. Check the changelog for further details of all the fixes. Please do keep identifying bugs and crashes and reporting them on Discord or on Github. The main reason this month has had so many fixes is due to more reports rather than last months release being particularly bug prone. If there is a particular bug that you know about that hasn’t been fixed, please raise the issue on Discord there might be a reason it can’t be addressed or perhaps we have just forgotten about it.
Add initial OpenGraphics objects (#2697)
@SteveEmfore has created 7 vehicle objects and @LeftOfZen created 14 cargo objects for the OpenGraphics project. The OpenGraphics project aims to create replacements for all vanilla objects. All of the objects will have slightly different names and look different but the stats of the vehicles will be identical to vanilla. It is planned that we will incrementally improve the objects. @DazWizzle has also created some road vehicles for the project but they were not ready for this initial release.
Next month I plan to add basic asset pack support. The plan is that when the OpenLoco asset pack is enabled any newly created scenarios will automatically switch objects to use the OpenGraphics equivalent objects. Opening a save will not cause any object switching it will only work on starting new scenarios. For now the default asset pack will be vanilla so there will be no automatic object switching.
Widget refactoring (#2674, #2675)
Continuing from last month @ZehMatt has been trying to improve the GUI widgets so that they work in a more logical way. There is still a good bit to do on this but it’s slowly getting there. Once this work is complete we should be able to simplify how creating UI windows work making it easier to add new features.
Misc audio refactoring (#2699, #2700)
New contributor @LeeSpork has been reworking the audio system this month. They cleaned up and simplified the music playlist selection. Audio in general is one area where we have fully reimplemented all vanilla code so it is ripe for new features and general improvements. We look forward to seeing what @LeeSpork has in mind.
Finish the paint functions (#2737, #2738, #2744, #2755, #2757)
@ZehMatt expressed an interest in improving how the ‘paint’ system worked. The one issue though was there was still one or two functions that hadn’t been implemented preventing the improvements. After a quick review of what was outstanding I decided to bash out the final functions. The final functions were road stations, tram pylons, supports and bridges. Please be on the lookout for any display issues with those particular areas this release.
In the vanilla code the paint functions take up a huge percentage of the codebase: ~20%. It’s a great milestone knowing that that is finally behind us. With this system finished expect a bunch of improvements in drawing over the coming months. For example we could: add multithreading support to greatly improve performance; or split the UI from the viewport to allow scaling the UI and viewport independently. Also with all this code implemented we know how everything is drawn in the game. If you are a mod creator we can tell you exactly in what situations an image is used. We could also add new drawing code for new mod features!
Simulate and compare on CI (#2765)
To verify that we haven’t accidentally changed the simulation of the game we like to run a couple of saves for a fixed amount of time. You can then compare the result against a reference. As the simulation is deterministic the two saves should always match. This has been very useful when implementing new game commands but as it’s run locally by each developer it can often be forgotten. @ZehMatt decided to fix this by running this test on the CI server which builds the game. For now this can only be done after a change has been merged but at least we know straight away which pull request broke things.