Sunday, January 21, 2024

Mostly Flatspace IIk Upgrades

Another amazingly busy day programming, as the title says, largely upgrading Flatspace IIk. The graphics engine is already 90% the latest one, but not entirely, and it takes a lot of care to upgrade each bit. In the end, most of it needed changing to some extent. I've added a new mouse pointer too, the one used in the new Gunstorm, and new mouse handling routines to standardise the GUI across all games.

The day started with Gunstorm I though, and then a first Steam release of Gunstorm II. I wanted the default speed to be 75%, hence the update, but later in the day discovered a bug in Flatspace which needed a Gunstorm update too. The old 'freeze' bug when using the Desktop resolution occurred when using alt-tab, so I added my fix to that.

In Flatspace, the icons and text are the hard parts, standardising the aspect ratio. Now, in my current engine, there aren't many programmatical differences between screen aspects. I code for 4:3, and shrink fonts and icons sideways for wider screens, then set the perspective to match. The result is a screen which looks, in proportions, identical. In Flatspace though I also stretch some things vertically. Some things stretched, some shrunk, making taffy from my GUI!

I've spent the evening trying to standardise it, so have increased the icon height by 33%, but applied the shrink rules to the text and other fixed objects. In Flatspace I can't do that with the icons because in Gunstorm (and my other games) the icons are centred, but in Flatspace they have a top-left origin, so if I shrink them, they'll shrink to the top left. Annoying; so I can't shrunk them, and the code is so complex that dimensional changes are not easy to calculate. I did, however, create a new font 33% bigger to match. Here is the old Flatspace in 1280x1024:

The first new version had a better fitting font (note the letters are closer together):

But the latest one has a bigger font all round, and those vertically stretched icons:

This looks better I think, much chunkier and easier to read. This was actually really time consuming to do! There are no constants or defines for the measurements of anything, and the many text routines seem to use real numbers all over the place. Because neither the icons or fonts are centred, changing the font size means tedious experimentation to put the text in the middle of everything. It took about an hour just to get the new size there, and the work of this means that slight changes (like making the font 10% smaller) are too awkward.

All of this isn't a problem with later games. My newer, standardised GUI system as used in Gunstorm (or Future Snooker/Pool, and I think and hope Taskforce) is much easier to do everything with.

Well, I have at least another day of work, probably a week, on this - sigh! I can't wait to move on.

The back roof of my mouth has erupted with yet another huge blood-blister. It seems that coffee and crisps are a causative combination. I now await two more weeks of pain, and perhaps inability to talk.

Well, onwards we must roll our rock. Speaking of rock and roll, there's a new open mic event starting this week. We plan to attend.