Development Progress Report, week 30

It’s starting to look “like a bought one”, as they say.

Who says that? They do. You know, them. Heck, I just did, so me too.

There’s a lot to cover, so I’ll try to be brief. I will likely fail.

I did that audit of the Narrator module’s global variables, and made sure I had a function to properly reset them all. That all worked well.

I thought at one point that I still had a problem with certain combinations of restarting and loading saved games, but that turns out to be an unfortunate (and probably unavoidable) consequence of making major changes to a scene which has been saved. When the story is reloaded, the performances in the scene might not quite match up exactly with where the saved story thought it was up to.

Have to pay attention to that if testing becomes more widespread. Or when patching things. Heaven help you if you renumber scenes once things are in production. Better not ever do that.

Sliders got a couple more iterations and are feeling even better than ever now. I’ve also got some simple tooltips coded up for some UI elements. Most of them don’t need them, and shouldn’t need them.

I’ve done some heavy optimisation, which has more or less trebled the speed of the Argus engine, and halved its in-memory footprint. I also added some tools so that story authors can manually trigger discarding certain cached assets, at points in the narrative when they know they won’t need them anymore.

If they do end up needed, they’ll be reloaded by the engine, at the cost of a scant few milliseconds.


Narrative text substitutions have become more intricate. I felt that the single-model for handling character names didn’t cover enough cases.

When one character (A) refers to another (B), there are three basic usage models:

  1. A is directly addressing B, by name.
  2. A is referring to B while talking to someone else, (C).
  3. A is referring to B in the course of narrative, which is being read by you, the reader.

Previously, I’d been almost exclusively using the first model (direct address) for all of these cases, and it was starting to break down and look inconsistent. So, what I needed was to properly implement these three models, so that it would be more consistent, easy to use (as an author), and still have individual references tweakable in case anything odd cropped up.

So, case 1 (direct address) assembles a form of address based on: What A knows about B’s identity, gender, nationality and so on, A’s sense of formality towards B, and any situational formality modifier that might apply.

The second case is similar, except that instead of A’s formality towards B, we compare it to A’s formality with C, and use whichever one is higher (that is, more formal) before applying any situational formality. If you’re talking to the Queen, you’re not likely to refer to a third person in overly familiar terms, as an example. Not unless you are also on pretty intimate terms with the Queen, in a very informal situation, at least.

The third case (narrative third-person), we skip situational formality entirely, and just use A’s base formality towards B.

For all three cases in the actual narrative, we can apply a modifier to increase or decrease the formality in any given case, just in case we need it to come out differently in a specific instance.

That proved to be quite an overhaul – due to having to refit a lot of cases in the story – but the results were excellent. I’m glad I did it.


While I was at that, I ended up altering some of the code that handles substitutions. Substitutions can alter text in various ways, most commonly filling in certain places with information that a character knows, or that a character assumes.

To simplify some in-scene branching, I decided to implement a ternary operator. Basically it works as: if this then show that otherwise show this other thing.

Since it was able to ride of the existing expression evaluation system, it was simple to implement, and saved some messing around when certain lines only needed to be partially modified.

Along with that, I made it possible to nest substitutions within substitutions, allowing you to make glorious, recursive messes, if that’s what you want to do. I’ve already found a dozen cases where that’s really handy.


The story-compiler has had a significant overhaul too, with more detailed syntax and grammar-checking. Once this was implemented, it promptly showed me about 40 places I had done something completely bone-headed that, while not strictly-speaking an error, caused results that were undesirable.

Not everything is checked yet. I’m working on that a bit at a time.

Effects and Audio

Some new visual effects have turned up. The area of the screen that isn’t covered by the narrative box can be tinted or painted any RGBA shade you please at any time. The change integrates with the scrollback history, and game-saves, without invalidating any previous saves. The format’s compatible.

This turns out to be a very good thing. It can be used in more or less subtle ways, but used correctly can really contribute to the presentation of the narrative.

There are also new sound-effects for SNAFU, which I’m still hooking into the narrative in the appropriate places.

I’ve got a to-do list of several more visual effects, including (at last!) sprite-support. I’m not actually intending SNAFU to use sprites, but Argus will certainly be supporting them before long. The effects framework that I’ve already built will make it pretty simple to add in.

I may yet eat those words.

There’s a couple dozen more things (Quicksaving was broken because I mismanaged one of the new UI-state bits, an easy fix), but those are the highlights for the week.

Not all of this is in Alpha 4 demo RC8 (currently available to alpha-testers), but there should be an RC9 tomorrow with everything listed here.