Changelog
- Feature: [#2116] Allow hiding vanilla and/or custom objects in object selection window.
- Change: [#2018] Scroll bar thumbs now have a minimum size, making it easier to scroll long lists.
- Change: [#2117] Scenario editor can generate maps with no towns, matching vanilla behaviour.
Development Log
A bit of a quiet month compared to last one, but there was still a good bit of work done.
Drawing engine refactoring
@ZehMatt has been working on improving the drawing engine, getting it into a better state for separating the rendering of the UI from the game viewport.
This month, it's cleaning up the invalidation grid, which tells the game what parts of the game viewport need to be redrawn.
A poorly optimised invalidation grid will cause decreased frame rates and can be the source of graphical z-fighting.
Load company face from company name
A little known feature of Locomotion is that you can change your company face image by typing in the name of a competitor object as your company name.
We only found out about this feature when implementing the function that did it.
General refactoring and cleanup
@memellis has been working on reducing the number of global variables in the codebase by using the existing game state global.
This is an important task that needs to be completed before we can start looking at increasing limits of OpenLoco, and it improves the structure of the codebase.
@NEJulnes fixed a long standing mistake in our variable names and localisation files related to formatting of fixed precision numbers.
Turns out we have two decimal place fixed precision, and also one decimal place. It was just named incorrectly.
@ilmoro93 attempted to build the project on Windows and realised our setup instructions were incorrect!
Thanks for fixing that, it's always important to have easy to follow setup instructions as it often scares off contributors if they are incorrect.
@LeftofZen fixed a couple of typos in the codebase (sorry, I think I added them...) and addressed static analysis warnings.
Static analysis warnings are important to stay on top of, they often indicate poorly written code or bugs (or both).
Create Track Mod game command
Track mods are what we call things like the third rail on track.
The game command for placing them is quite complex and requires iterating along the rail track to ensure it is being placed on the whole track network or track block.
Now that it's been completed, we have a much better understanding of how track iteration works in the game.
This should hopefully be the gateway to having an automatic signal placement feature.
Expert mode object selection
@AaronVanGeffen worked on a few UI related items this month, but the main one was the expert mode for the object selection.
When in expert mode, every single object type is shown to the player.
In addition, Aaron added filter options so that the object selection can show only vanilla Locomotion objects,
or only custom objects (or both).
Hopefully, this will make things easier for scenario makers to find the objects they wish to add.
Draw string ticker
When news items are generated in the game, they can be set to create a newspaper-like window,
or they can be sent to the news ticker in the bottom right corner of the screen.
The ticker message has a surprisingly complex bit of code for drawing the message, so hadn't been implemented.
Now that it has been done, it's showing some of the issues we have in the codebase related to string drawing.
Over the next few months, we hope to improve string drawing. Eventually, it would be good to finally be
able to display languages that don't use the Latin alphabet!
Known issues
- Multiplayer functionality is not available at this time.