Chimerror Productions

Quoll Work Thread, 2025-01-16 #2 - 2025-01-16 15:28

Tags: blog gamedev inform7 interactive fiction programming quoll testing text adventures

I was able to finish updating the skein and check in my changes to get that all nice. I then did some project management grabbing a few more “structural” changes I wanted to do that I had missed, and downgrading a few other TODOs to things I need to wait until I get to “writing” mode. I grabbed the first one of these to fix, an oversight that exists in production (I just filed a bug on it even though I’ve known about it for at least a year). Fixing it was actually harder than I expected…

Being a game about time travel, the game starts at a very particular time, 21:21 on January 24th, 2020. If I remember correctly, this is the point of the lunar new year for that year (which is appropriately, the year of the rat). The Playerr and Ada begin in Ada’s apartment in Seattle, where there is a basic puzzle meant to introduce the basic text adventure mechanics while setting up the world and stakes. I didn’t imagine it would take too long for Playerrs to figure this out.

The way time works in Inform 7 is that each turn usually increments it by one minute. You can modify this behavior if needed, which I do to have certain areas of Funge Space freeze time. I don’t do this in the starting Seattle Apartment level, which means if the Playerr takes at least 160 turns, that it will become midnight. As I said, I didn’t think this would be a problem, but interestingly enough, we actually did hit it in our playthrough of the last major release.

While the time correctly updates, the date is something I had to implement myself so it does not. So I wanted to fix that, at least for the likely common case that a Playerr spends more than 160 turns in the Seattle Apartment level. This is not something major, but it’s easy enough to knock out, so I wanted to.

I added the following code:

At 11:59 PM (this is the sa update day rule):
    unless Apartment Level Scene is happening, do nothing;
    increment the current day.

and because the date only shows up on the status bar on the web version, I added a testing Action to test it:

Chapter 0.7.1 - Day Update Testing Command - Not for Release

Checking the current day is an action out of world applying to nothing.

Report checking the current day:
    say "The current day is [the current day].".

Understand "check-day" as checking the current day.

To my surprise, the checking the current day Action caused a build failure complaining about an invalid socket wiring. It took me a bit to figure out it was the Action, and once I did I realized that this is because much earlier I added a similar testing action to check the current time, very appropriately named checking the current time.

This isn’t the first time I’ve ran into something like this using Inform 7. In general, the parser only checks the first 9 characters of input tokens, which isn’t too big a problem for Actions and nouns, but was a big problem for writing descriptive test names back when I was directly using Inform 7’s testing functionality instead of generating my own Skein from my tests. I guess I would have assumed that was also limited to the parser itself, but it seems not!

Either way, for a simple testing Action like this, it was easy enough to rename the new Action to current-day checking, but I’ll have to keep an eye out if I add any more Actions.

Anyway… onward!

Jaycie “chimerror” Mitchell