I’ve been a tagalong in parts of the Interactive Fiction community for quite a few years, and so learning to use Inform 7 has been on my backburner since it first arrived. I’ve dabbled with it enough to contribute a few Very Small things, and attempted a proper game for the first ShuffleComp a few years back. But each time I’ve began, I’ve hunted the manual for information and generally find myself so flabbergasted by Inform’s capabilities that I get derailed from simply implementing the small thing I was looking for.
This year I’ve had an Idea that I actually want to write out, and a motivation to do so. So I’m going to pull together enough spare-time learning energy to work my way through “Writing with Inform”, the manual written by Inform’s creators. (You can find the manual built into the Inform application, or downloadable / readable on the website.)
Inform is specifically designed for interactive fiction, the sort where you type commands and move about various rooms and pick up objects to solve puzzles and all of it is text. Inform is also astounding in that its source code is fully readable English text. Here’s an example from the manual:
4.2. Scripted Scenes
The player carries a lockpick, a smoke bomb, a grappling hook, and a pair of gloves. The description of the lockpick is “Effective on most kinds of key locks, it is a gift from your mentor in the discipline, old Wheezy.” The description of the smoke bomb is “Your last of these, so you should rely on it only when other modes of escape have vanished. It takes effect when dropped, producing a cloud of purple haze sufficient to fill a medium-sized room.” The description of the grappling hook is “Good for shooting at balconies and other sorts of overhang.” The gloves are wearable. The description of the gloves is “Black and shiny, with gripping material on the palms. Batman would be jealous.”
Reviewing Possessions is a scene. Reviewing Possessions begins when play begins.
Escalating Danger is a scene. Reviewing Possessions ends when Escalating Danger begins. Escalating Danger begins when preparations near completion.
To decide whether preparations near completion:
if at least two of the things which are carried by the player are seen, yes;
This isn’t the text of the gameplay – this is part of the source code that generates the game.
As you can imagine, this makes it pretty easy to read existing source code. It also makes for a much friendlier introduction for those intimidated by this.kind(of, punct.uati(on)); .
But it’s still a programming language, not a natural language parser. What this means is that while valid Inform code is readable English, not all readable English is valid Inform code. Inform can be picky about punctuation choices, variable names, and structure just like any other language. Writing it is still programming, with error messages and misunderstandings and a need for specific knowledge of the system.
It’s also somewhat overwhelming for me when I’ve merely dabbled, because it’s so incredible. Inform’s rule-based system doesn’t map cleanly to the kind of programming I’m familiar with, and the system is capable of a great deal.
So, reading the manual!
I’m at a point where I need to summarize what I’ve read in order to make any more progress forward. I’m blogging my summary because I like the idea of supporting the IF community with a bit more exposure, and because it forces me to process my thoughts more completely. I’ll be writing from the perspective of a programmer who’s already familiar with C-style code and a handful of other paradigms, and will end up comparing and contrasting Inform’s terminology with usual programming concepts out of necessity.
If that’s the kind of thing you might find useful, great! If not, drop back in a few months and I’ll be blogging about something totally different again.