Hello, fellow authors! I’ve been neck deep in my own work for this year’s Spring Thing festival, which has left me little time for anything else, IF or otherwise. But the submission date has come and gone, and I am once again free to work on my other projects, including Let’s Make IF!
You should check out some Spring Thing games! Not necessarily mine, but a great way to be involved with IF is to be… involved with it! You can find the games here.
Spring Thing Festival of Interactive Fiction
Find something you like? Consider telling your friends, or writing a review, or rating games on IFDB. Or sending a nice note! Consider supporting creators who make content you value.
where were we.
Let’s ease back into scenes. Consider this rather bare scenario:
diner is a room.
the lunch counter is a supporter in diner.
a sandwich is a kind of thing.
a sandwich is edible.
the grilled cheese is a sandwich on the lunch counter.
the description of the grilled cheese is "Buttery, gooey, with a delightfully crisp exterior."
What is time in such a place? There is no code to govern the temperature of the sandwich. In the real world, it would become less gooey as it cooled. We’ve talked about this kind of thing before: we could use values or global counters to simulate the temperature of the sandwich.
temperature is a kind of value.
the temperatures are volcanic, warm, cellar, cold.
a sandwich has a temperature.
the temperature of a sandwich is usually cellar.
alternately:
a sandwich has a number called temperature.
the temperature of a sandwich is usually 1.
This hopefully looks familiar! Inform is built to do this kind of thing right out of the box. As values change, the in-game sandwich cools. Just throwing something together…
a sandwich has a number called timer.
the timer of a sandwich is usually 3.
the grilled cheese is volcanic.
every turn when the temperature of grilled cheese is not cellar:
if the timer of grilled cheese is 0:
now timer of grilled cheese is 3;
now temperature of grilled cheese is the temperature after the temperature of the grilled cheese;
otherwise:
decrement timer of grilled cheese;
say the temperature of grilled cheese;
This kind of thing is a bit fiddly, isn’t it? We have a thing–the sandwich–with a timer, and the timer leads to a value we call “temperature.” I’d call this “thing-centered” design. Whether we’re talking about lamp batteries in Zork or the broken dishes in Repeat the Ending, timers and properties have always had a place in parser games.
You might be waiting patiently for me to rework this little snapshot, substituting Inform’s built-in scenes for my from-scratch values, but I won’t. In truth, scenes are themselves values with some nice hooks into Inform’s indexing and syntax. There probably isn’t a huge benefit to just doing the exact same thing with scenes rather than global variables. If I show just the start of the road, you’ll probably see that it doesn’t lead anyplace better.
volcanic sandwich is a scene.
volcanic sandwich begins when play begins.
volcanic sandwich ends when time since volcanic sandwich began is three minutes.
warm sandwich begins when volcanic sandwich ends.
when warm sandwich begins:
say "Eat your sandwich while it's still warm!";
Using scenes to simulate time is really beside the point. Scenes are meant to make games feel dynamic; they are not, per se, simulation tools. Let’s try to think about scenes differently. When last we convened, I created a scene called “lunchtime.” Let’s go back to that.
lunchtime is a scene.
If a “thing-centered” design spins from the state of the sandwich, what would a player-centered design do? In this game, lunchtime starts whenever the player shows up for it.
lunchtime begins when the player is in the diner for the first time.
In other words, what is this part of the game about? Our choices will make it easier or harder to emphasis certain elements. The sandwich timer might presage a puzzle. Lunchtime seems more like an ambiance. These two aren’t exclusive, of course. We could have ambiance and timers all at once. But it can’t hurt to have an idea about intent.
the description of the diner is "[if lunchtime is happening]The lively diner is in the midst of the lunch rush.[otherwise]A cashier slumps against the register, clearly bored."
next.
Using scenes and relations to print variable texts in Marbles, D, and the Sinister Spotlight.
