Informing You: Text Adventure Tool Inform 7 Has Updated

This picture is purely symbolic.

Inform is one of those tools, like Game Maker and Unity, which unlocks new creativity. It’s a programming system for creating text adventures in which you can write your stories using something resembling natural language. It’s more complicated than Twine, but also consequently more powerful. It is, basically, good enough that it makes you want to write interactive fiction, even if you’ve never considered that before.

It’s exciting then that a new version has been released, “three years in the making”, which expands the languages handling of procedural storytelling.

Inform is powerful in ways which sound small, but are actually magical. If you write “Bathroom is a room.” in your code, then Inform understands that the Bathroom is a location you can leave and enter. If you write “Hallway is east of Bathroom,” then Inform understands that Hallway is a new location and its relative position with the bathroom. If you write “The helmet is a wearable thing,” then Inform understands that the player can pick that thing up and wear it. It’s basically taking English and turning that into a simulation the player can reside within. Here’s a representative example of what the code looks like.

From update post, here’s the key set of changes in this new version:

It has the following main objectives: to clarify and better enforce the syntax of the language (which is now formally documented); to have much greater linguistic flexibility, enabling stories to be written in any person and tense, and paving the way for translation to non-English languages; to remove phrases and features which have been deprecated for some years; to remove procedural rules, which were little used or understood and incurred a significant speed cost at run-time, in favour of simpler ways to substitute rule behaviour; to remove assumptions about the kind of narrative being written (i.e., that Inform is always making a “game” which is “won” or “lost” and has a “score”); to reform the rules handling “blocked” actions, such as listening; to redesign the Index, the in-application documentation, and the extensions index; to reform the handling of text, unifying “text” and “indexed text”, and improving their performance; to introduce a simple but powerful system of “responses” allowing authors to change stock replies in the Standard Rules and other extensions, including third-party ones (and also to make it easy to translate these to non-English languages); and to implement full floating-point arithmetic in numerical kinds of value, at least on the Glulx virtual machine.

I like that it has ‘floating point arithmetic in the Glulx virtual machine’, because those are all fun words to say, but the really interesting bit is the changes to procedural rules. I’ll let Emily Short, one of the systems’ main architects, explain via her own blogpost:

There are loads of new things going on, but I’m particularly excited by Inform’s new adaptive text, which I see as a partial step towards making the system more capable of doing interesting things with procedurally generated text output. The adaptive text allows Inform to inflect verbs according to the current tense and viewpoint of the story, automatically turning “[We] [walk]” into “You walk” or “He walked” or “We will walk” according to the current settings.

But it goes considerably beyond this. The new example “Narrative Register” shows how to associate verbs with different actions, then have the narrator automatically describe what has just happened with a verb that is appropriate to a current “diction” setting. The “Relevant Relations” example associates verbs with relations as well, and shows a way of doing room descriptions in which the author tells Inform which relations ought to be described to the player, leaving the system to assign appropriate verbs and construct sentences around them.

If you’re interested, here’s the absurdly long changelist. But really, you should go download and have a play around with Inform 7 this weekend. It’s a fun time.


  1. Harlander says:

    I find Inform to be incredibly fascinating, but I never managed to really do anything with it.

    • LionsPhil says:

      I found it quite cool to toy with, and a lot of effort has been poured into it with tooling like the skein to help do test coverage of your tale, but absolutely cannot understand why they want to use natural language for input. Inevitably, I ended up caught in syntactic tangles that simply wouldn’t have existed with a tight, formally-specified programming language.

      “You can write a program in plain English” may sound attractive to the layman, but what that actually means is “you can try to express your intent to a computer via a fuzzy and ill-defined series of tokens it only barely understands and which in normal world practice is largely resolved by context and heuristics it can barely approximate”.

      You know, like Perl.

      • Harlander says:

        That’s pretty much what I found, to be honest, except that it’s pretty obvious why they want to use natural language for input: it’s because people mostly write in natural language.

        “But that’s just going to lead to horribleness!” you might say, and indeed it did.

        • Gap Gen says:

          I imagine natural language programming would be easier if computers could understand the subtext and context of an instruction, but as it is I assume it just confuses programmers and non-programmers alike (and having vague, interpretable instructions is going to make debugging a nightmare).

          • The Random One says:

            I remember hearing a story about a certain species of llama that had excellent wool, but had such a poor temperament it could not even be raised in captivity. Farmers tried to solve that by breeding with with another species that had no fur but was very docile. The resulting hybrids had poor temperament and no fur.

            Natural language programming goes the same way. Instead of allowing programming to be accessible by making commands simple, it has both the fiddliness of programming languages and the ambiguity of natural language.

          • tlwest says:

            Exactly. English is horrible for creating non-ambiguous instructions, which is exactly what is required for computers.

            When English is mangled to remove the ambiguity, you get… legal documents. In other words, something vastly harder than a non-ambiguous computer language.

            “Natural language” programming languages are designed to get the ill-informed to purchase them with the idea that they won’t need to hire expensive programmers. Of course, the customers then spends three times as much on expensive programmers, because natural languages are massively inefficient for programming.

      • Michael Fogg says:

        Programming/scripting languages are part of the kyriarchy.

  2. xenothaulus says:

    Ago, my friends and I had written an adventure game in BASIC. I wonder, if we still have it lying around anywhere, if we could transcribe it over to Inform…

  3. Eleven says:

    The “adaptive text” feature is a key paradigm. Most games either program rigid scenes for every situation a player is allowed to experience, or just give you a sandbox that has no narrative that the player doesn’t add themselves. Instead, Inform is moving towards a more procedurally generated approach that writes new scenes from pre-written building block based on the actions of the player, allowing for a lot more flexibility and giving the player more agency in the game world and more scope for creativity.

    The “adaptive text” is only a small step, and certainly nothing that hasn’t been done before in small research projects, but it’s exciting to see a complex game engine like Inform to start to develop real procedural storytelling capabilities.

  4. zabzonk says:

    Speaking as someone who has used most of the current IF writing tools, I have to say I think Inform 7 is terrible. Scenes, actors etc. are described by the programmer in English, but this means that the development of a story becomes an adventure in itself, as you find yourself struggling to provide something the parser will accept, and getting completely meaningless error messages when you don’t. If you want to write interactive fiction without suffering apoplexy in the process, use a tool that uses a formal language to describe scenes, actors, items etc. such as TADS3.

    • Sunjumper says:

      I have no expirience with this, I have just browsed the manual and some charts and cheat sheets for Inform, but does Inform not use a formal language with strict rules that happen to look and sound like plain English?
      Is the problem that the rules are not well specified enough or that the nature of the normal looking language used to code the game tempts to use normal langauge to get things done which makes everything quite complicated?

      • LionsPhil says:

        Well, from the quoted update notes:

        to clarify and better enforce the syntax of the language (which is now formally documented)

        You’re hopefully describing a much-improved “after” state. When I played with it a few years back, actually getting grip on the syntax rules was remarkably hard because they were “natural”, which meant the same guess-the-parser game as playing a stubborn text adventure of old, as zabzonk says.

        Sorry, I don’t know how to “called”.

        • Gap Gen says:

          And indeed “foo=5” is signiicantly nicer to write and can be understood by a child. To some extent certain programming languages use elements of natural language; in Python you can write stuff like: if beans is not True: print, “There are no beans”

          • The Random One says:

            The unbearable trueness of bean.


          • jrodman says:

            Although, that is kind of naughty python. Testing explicitly for True is not usually a good idea, and testing for a specific object is generally not what you want to do (although for True, it is fine). Normal python would be

            if not bean: print(“There are no beans.”)

          • Gap Gen says:

            bean = bean is not not bean

          • LionsPhil says:

            die "A program cannot live without beans" unless $beans;
            This is pretty much why Perl has postfix conditionals. They are, at least, defined syntax. Mostly.

            Even if the formal spec is “the Perl 5 source code” because all computing is a Jenga tower of lies.

    • frightlever says:

      “If you want to write interactive fiction without suffering apoplexy in the process, use a tool that uses a formal language to describe scenes, actors, items etc. such as TADS3.”

      If this works for you then that’s great,but other people will be trying to get over the hump of doing anything creative on a computer and being able to follow a tutorial that reads like English and ten minutes later have something to show for it is a great incentive.

  5. King in Winter says:

    I looked into Inform7 a good while back, and I found like the others in this thread that the natural language paradigm was a significant hurdle in learning to use it. I believe if it had used a strictly defined programming language conventions instead, it would have been much easier to use. They’ve probably worked long enough on the engine to prove that “natural language programming” an IF is a pipe dream.

  6. JohnnyPanzer says:

    I like the idea… on paper. But it must be an absolute nightmare to troubleshoot and debug. As someone who had never written a single line of code in my life before I picked up GameMaker, I think most of us laymen are way too scared of programming languages. It came pretty naturaly once I tried it and within a week I was no longer using the click-a-button-interface for anything more than shortcuts to the actual coding.

    That also opened a lot of other doors for me. Having used Maya for ten years, I was able to take a look at it’s python code functions for the first time and can now write quite a few simle scripts without help. Stuff like this tends to sound great when you’re unwilling to take the plunge, but in the end it often just complicates things. Actions that could be written in code in a few seconds and a minimal of know-how can suddenly become hours of frustration.

    Same goes for do-it-yourself graphic packs. I noticed that Steam recently released Indie Graphics Builder and after I checked it out I’m pretty convinced that it’ll make a lot of people starting out with 2D graphics paint themselves into a corner. Sooner or later they’ll reach the threshold where the engine can’t do what they want to, and then they’ll find out the hard way that they’ve spent a lot of time learning a skill that is essentially useless outside that specific program.

    • LogicalDash says:

      Indie Graphics Builder isn’t a program, it’s a bunch of images. When you buy it you’re really only paying for the license to use those images. You have to piece them together yourself in Photoshop or whatever.

  7. Gilead says:

    Every year I tell myself that I’ll make a game for the IFComp using Inform 7.

    Maybe this year.

    Probably not, though. The natural language part always sounded good, but it turns out I prefer just being presented with something entirely alien, having that explained, and then being able to set aside a bit of my brain with a label marked ‘This is what I use for text adventures’.

    Inform 7 is close enough to actual English syntax that my knowledge of the real language interferes with my ability to absorb how Inform 7 works.

    • The Random One says:

      Have you tried TWINE? If you’ve ever edited a Wiki-style site and don’t absolutely need parser-based commands it’s a lot simpler. (You can twist parser-based commands out of TWINE but it’s so hard you might as well just learn Inform instead.)

      • King in Winter says:

        While TWINE is probably good at what it does (I’ve only taken a cursory glance at it) let’s not mix up two things here. Inform and its kin are IF engines. TWINE and its siblings are CYOA (choose your own adventure) engines.

  8. Corwin71 says:

    I’ve had more than a couple of false starts learning Inform 7 and writing my own game. This update has gotten me thinking again, naturally….maybe something concrete will come of it this time. I’m glad to see Inform still being updated. Twine and such are nice, but I’m very partial to parser-based interactive fiction.

  9. Sunjammer says:

    I read this paragraph from Emily Short’s example:

    Understand the command “adjust” as something new. Understand “adjust [something]” as fitting. Fitting is an action applying to one thing. Carry out fitting something: say “There’s no useful way for you to adjust [the noun].”

    I have NO idea why this is considered better than the alternatives. It reads like a riddle wrapped in a tongue twister.