Development Progress Report, week 63

It seems like a lot happened this week. Much of it was related to fonts and the new embedded Lua scripting. Oh, and screwing up. There was a reasonable amount of that, too.

I’ve extended the Lua API functions considerably, allowing the story to provide additional UI customisations via Lua scripts.

It’s very nearly possible to completely reskin and rearrange the user-interface in a variety of ways. I need to provide a few more functions before that’s complete, but it’s cool. Entirely new widgets can be created, existing ones can be disabled, and they can all be repositioned or resized.

Soon (but not quite yet), you should even be able to do much of that on the fly, assuming you want to switch the UI around mid-stream, and maybe switch it back.

Here’s an alternate layout to the narrative area that I was able to throw together in a couple of minutes (I haven’t moved the onscreen buttons across, is all):

To go from the regular layout to this one only required four definition lines:

@script:position:locationimage:setpos(0,0,screen_width(),screen_height());
@script:position:narrativebox-shadow:x,y,w,h=getpos(); setpos(-30,y,screen_width()+60,h);
@script:init:narrativebox:disable();
@script:init:narrativearea:textcolour("self","white");

And then, I screwed up.

During this, I tried to rewrite a little bit of the built-in positioning code – the bit that does the default calculations, if you haven’t overridden it. After a couple hours I became increasingly convinced that I had lost the power to perform or understand arithmetic.

Until I realised that I actually had a lua-script that was completely overriding the result of the calculations for that widget. Argh. Problem solved.


Last week, I added a text-size slider to the narrative area, and rigged it to calculate a target number of characters-per-line. If the font-size was too small to hit that target, it would be increased. If it was too large, it would be decreased.

It worked alright, but if you resized the window, the size of the narrative area changed, that changed the number-of-characters-per-line calculation, and that changed the text-size in turn, and … actually, that became pretty unintuitive.

That is, it did what it was supposed to do, but it didn’t feel very intuitive, unless you understood the underlying technical mechanics.

The other thing that was wrong with this was that – since characters-per-line was dependent on the size of certain widget-size calculations – font-sizes had to be calculated after all widget-size/position calculations were done. Then, if the font changed, we actually had to recalculate them to make sure certain widgets were resized for the new fonts to fit in them properly. Whew.

So, I bit the bullet and simplified. The slider basically just directly ties to the size of the font in points, now (starting at a minimum size of about 10 points). It’s actually not as versatile, but more intuitive. As a bonus, the math is simpler.

Mistake: Due to a bungle, I managed to use two different calculations for italic and non-italic text, which I didn’t notice right away, so a couple builds would up with italic text scaled to about half the size of regular text. Another screw-up for the ages. Huzzah!


I’ve also downscaled some of my larger graphical assets to 1280×720. Some of them were at 1920×1080. A couple of them were at at least 25% larger than that. That meant larger downloads (though not huge, because it’s still quite compact for what you’re getting), and more system-resources used (particularly VRAM).

We’ll have to see how the smaller-scale imagery looks in practice when upscaled to a larger display. Doesn’t seem to be terrible, on the face of it.

The engine binary itself has just topped 1.4 megabytes. Soon it will be too large for a floppy-disk. That said, there’s a lot more needed to run it. The assets and story-file, for example, and another 5.5 megabytes of shared-libraries, plus whatever the language-runtimes amount to.


You’re seeing a lot of engine-features, and not a lot of work on the story. Why?

Basically, I’m starved for feedback.

Getting people to put the reading time into the game-prototype is difficult. It’s not that I’m having trouble getting people to give it a second go, it’s just that it is nearly impossible to get people to give it that first go. Committing to reading a story – or even a biggish chunk of one – isn’t easy, I well-understand.

Because a number of assets aren’t yet properly licensed, I can’t exactly throw the demo open to all-comers. I need to keep that circle small and closed. That said, the last time I was able to get anyone external to actually install and try the demo was … hmmm … November, 2015, apparently.

That was a while ago, now, as I think you’ll agree.

If you would like to help out with this, let me know.