Monthly update for December 2017.

3 minute read

Here is a (somewhat late) update for the last month.

December was not as productive as the other months, which was kinda to be expected really. While I didn’t have much spare time on my hands I still managed to sneak a few updates. Let’s see what got done during the last month of 2017.

Persistent Game Options

I’ve implemented a system for storing the options inside the “persistent” location - using the persistentDataPath location provided by Unity (“appdata” directory in the case of windows).

The idea is very basic - we want to store and use game options in a way that’s persistent between sessions.

Considering it’s already known there will be at least one separate “dev” version of the game (with only the main scene without all the intro menus), meaning it’s likely there will be often a need for switching between different executables - we want the options we set in one session to load up the same way in another session, no matter if it was the “dev” version or a “regular” version. Also - no matter if you’re attempting to run an older version of the game - if the options weren’t changed all the options should persist between the sessions (if there were changes to the options themselves, for example if a newer version of the game introduced some new options, then this will not work).

Loading plates at runtime

Loading custom plates directly from scripts, using just a path reference.

So far I’m loading only basic province plate (8192x4096) from script. Loading prop plates is not supported yet, and it’s not really a top priority right now.

Province plate loading works great. Processing the plate, including scaling the texture down for generating smaller plates from that big one, can take a few seconds on slower machines. The process is somewhat optimized already (the scaling itself is threaded), I don’t think it will get much faster than it is right now.

Fleshing out the decision window

I started prototyping the decision window, with dynamically created list of choice buttons based on the decision data. It will also use an image provided by the script. I’m considering an option for custom sounds to the decision window. That would be pretty cool.

A timer is also an important addon. All the decisions will have a deadline specified, timer shows how much time there is left to make the decision. If you don’t want to make the decision right now and there is time left, you can bookmark it to be able to easily find it later. Or you can let the AI handle it, though I wouldn’t advise that, unless until there is an actual AI to handle it (initially it will probably just be random).

I want to have some options in place for the decisions, so you can decide what kind of decisions you want to get popups for, what kind you want to get notifications for, etc. Proper notifications won’t get implemented any time soon probably. Finished globemap province plate

Decision window WIP

Fixed tooltip

Tooltip will now always stay on the screen.

It was earlier possible for a tooltip to extend beyond the screen, for example if there was some UI element positioned near the bottom of the screen, and it had a tooltip fired on mousing over, the tooltip would go down off screen.

Now it will adjust it’s position in such situation to not go off-screen. Neat.