Another Language

by Guy

Guy looks at the world of interactive fiction using Inform 7.
~
This is a review, mixed up with a description of some of my own experiences, of a language for writing interactive fiction games, called Inform 7. Perhaps I will start by saying something about interactive fiction.

My first experience of interactive fiction was playing a game called The Hobbit on the Commodore 64. At the time, it presented me with a wonderful illusion of complete freedom within a computer game, unlike anything I'd played before. The games I'd played up until that point had mostly understood five instructions, being the four directions available on the joystick, and the fire button. You could move around, and you could shoot things. The Hobbit was different, because you could write in anything you could think of; the main frustration with this was that it was slow and then a lot of the time what you could think of wasn't something you could actually do. Trying to look through a high window, I tried to write something like "jump up and look through the window", only to be told "I don't understand what you mean" or words to that effect. Still, I enjoyed The Hobbit for a long time, although I never did finish it -- I think it wasn't really designed to be winnable by small boys, unlike Archon and Gridrunner and various other entertaining distractions I enjoyed at the time.

I won't go into my full personal history of playing IF (Interactive Fiction; also called "Adventure Games" or "Text games"), except to say that that problem which I first experienced with The Hobbit turned out to be something which was there through all the various IF games I played for a long time. One would be moving along through some kind of story, at various points being interrupted by puzzles, only to arrive at a puzzle which I could think of a solution for, but for which the program wouldn't understand my explanation of my solution. I became less interested in IF games as other types of games began to give me a stronger sense of being immersed in a world which the player could interact with freely and meaningfully. Ultima 6 and The Mines of Moria were probably the games that signposted the end of the road for my love of IF.

It was a long time after that, that I came across a little IF game called Photopia. This wonderful little game was different than any other IF game I'd played for several reasons. One, it was free -- I'll get back to that part in a minute. Two, it was short -- you could play through the whole thing in one brief sitting. Three, most importantly, there were no puzzles. The interest in the game came not from being able to "beat" the game and finish it, but from the characters and the story -- quite a beautiful, touching story, and very well written.

It was free principally because of the work of Graham Nelson, an Oxford mathematician. Nelson wrote a language for creating IF games, called Inform, which he gave away for anyone who wanted to to use. (There had been a long line of such languages, the best of which was TADS, but all of them had cost money in one way or another, which meant that the pool of potential authors was limited. In response to Inform being freely available, TADS and several other systems were soon free, too). The free availability of Inform, along with the growing access to the internet, meant that a small but lively community of IF authors soon developed. One of the best of these authors was Adam Cadre, who wrote Photopia, the game that lead to me discovering all of this.

Well, ever since I first played computer games I had entertained fanciful notions of creating them myself. BASIC had allowed me to write very short multiple-choice "games" (Go left or right? Left. You fall into a spiked pit and die horribly!) but that was as far as I'd ever been able to get. The prospect of being able to write any kind of game -- even if IF games were no longer really my favourite genre -- was thrilling. Besides, the example of Photopia had inspired me with the thought that the frustrations and limitations of games like The Hobbit could be transcended, if the author knew what they were doing.

Sadly, I soon discovered, the author did not know what he was doing. By which I mean, once I started trying to write games in Inform, I found that anything much more complicated than laying out a fixed map of static, empty rooms was beyond my programming skill. Perhaps if I'd had more time, patience, maturity... but I didn't. Making interesting games was much, much easier than it would be without Inform to help me, but it was still more difficult than I could manage. Other languages (such as ADRIFT) would have made it possible for me to make games, but the limitations of the language left me feeling very uninspired; none of the ADRIFT games I played had anything like the complexity or sophistication of the best Inform or TADS games.

Fastforward to the present moment. (Here's where the review starts, by the way.) Nelson has again done a wonderful thing. Inform has been updated to a new version, Inform 7. (There have been suggestions that this iteration of Inform is so different from the previous version that it ought to be called something else, like "Ocelot" or "Teacup", both of which I think are fine names, but still, "I7" has quite a nice ring to it, too). When I started looking at some of the source code for I7 games, I was shocked. It was as though Nelson had written this language with the exact purpose in mind of trying to solve the problem I'd run into with I6 the last time. I won't show you an example of I6 code, but suffice it to say that for a nonprogrammer like me it looked a lot like any other source code does; weird brackets and semicolons all over the place, in arrangements that I could see were probably logical but, alas, with the specifics of that logic entirely escaping me. Take a look, then, at the following scrap of I7 source code:
"Midsummer Day"

The Gazebo is a room.


Guess what? That will compile and run. That's a complete game. Of course, it's not a very interesting game. However, given that it takes all of three seconds to type out, you wouldn't really expect it to be. What's really interesting about it, though, is that someone who knows and understands nothing about programming can read it and know exactly what it will do. Compile and play it, and you get a transcript that looks something like this:
Midsummer Day

An Interactive Fiction

Release 1 / Serial number 061110 / Inform 7 build 3T38 (I6/v6.31 lib 6/10N) SD

Gazebo

> look

Gazebo

> inventory

You are carrying nothing.

> go north

You can't go that way.


Well, that's very nice for setting up rooms, but what about a game that actually does something -- this is where the millions of nested brackets and incomprehensible DO R$ FOR I = 1 TO 20 stuff starts, right?
"The Undertomb"

A dead end is a kind of room with printed name "Dead End" and description "This is a dead end. You'll have to go back the way you came, consoled only by [river sound]." A dead end is usually dark.

The Undertomb is a dark room. East is a dead end. South is a dead end with printed name "Collapsed Dead End". Northwest is a dead end called the Tortuous Alcove. In the Undertomb is the lantern. It is lit.

A dead end has a property called river sound. The river sound of a dead end is usually "a faint whispering of running water". The Tortuous Alcove has river sound "a gurgle of running water".


From which we can derive a game with the following transcript:
The Undertomb

An Interactive Fiction

Release 1 / Serial number 061110 / Inform 7 build 3T38 (I6/v6.31 lib 6/10N) SD

Undertomb

You can see a lantern (providing light) here.

> e

Darkness

It is pitch dark, and you can't see a thing.

> w

Undertomb

You can see a lantern (providing light) here.

> get lantern

Taken.

> e

Dead End

This is a dead end. You'll have to go back the way you came, consoled only by a faint whispering of running water.


If you can understand how that first scrap of writing relates to that transcript, congratulations, you are well on your way to being able to read I7 source code -- and to write it.

There's been a fair bit of argument in the IF community about I7. And in fairness I should say, games which are more complex than the two examples I've given above do, gradually, start to get more confusing to write and to read. But for me, the big thing is just that I look at that "code", which looks so much like normal English, and I think, "I can do that! I can do that right now!" And this is all that's needed in order to get started.

In fact, I did get started. I've written a short but playable game (admittedly using quite a bit of borrowed code) (but again, borrowing the code was easy because I understood what it was and what it did) which, someday after I get out of thesis hell and actually have the freedom to work on it, I intend to make into a game which is not only playable but interesting and enjoyable. And if you've ever dreamed about creating a computer game, but felt that computer programming was an impassable wall between you and that dream, I can't recommend highly enough that you download I7 and give it a go. Thanks to Nelson, that wall has become very low indeed.
~

bookmark this with - facebook - delicious - digg - stumbleupon - reddit

~
Comments (go to latest)
Rami C at 13:45 on 2006-11-10
Being a programming rather than a gaming geek, I'd be quite interested in how much (and how) Inform does this behind the scenes -- do you have any useful links?
Kyra Smith at 10:33 on 2006-11-14
Wow, this is fascinating! I made a room containing a pan of peas boiling over last night. It only took me, like, half an hour. And what a fascinating adventure that was. I lack the nostalgic "this is real gaming man" attitude some people to have to text based adventures, I think possibly because I'm rubbish at them and always end up not knowing what to do with the grubby cooks or how to get Ford Prefect to give you the bag of peanuts. I know they give an impression of infinite freedom but all I ever seem to run up again is infinite restriction.
Guy at 02:24 on 2006-11-24
Kyra - I should have included links in the article. Here's a link to Photopia, which you might enjoy, or you might find just as frustrating and limiting as all the other text games you've ever played. :P

http://adamcadre.ac/photopia.html

You'll want the third thing on that list.

Rami - I'm not sure if the info you're looking for exactly is available anywhere on the web, but probably the best place to start looking is here:

http://inform-fiction.org/I7/Download - Documents.html

Especially that thing labelled "Natural Language, Semantic Analysis and Interactive Fiction". If you were to send Graham a clear and interesting question by email, there's also a half-decent chance he'd send you an answer.

Rami C at 12:36 on 2006-11-24
Thanks Guy - I hadn't seen that page when browsing the site before! I'll certainly have a look and might even get involved with creating an I7 version for Linux - it sounds very, very cool!
Guy at 11:58 on 2006-11-25
Hey Rami - no worries. If someone were to create a Linux version, that would be very cool indeed. :)
Cassie at 10:32 on 2006-11-28
I've read some Adam Cadre - his short stories on his website and his book 'Ready Okay!'. I loved his book, read it in one sitting. I never played his IF, though, because I was utterly confused by *how* to play an IF.
Cassie at 10:32 on 2006-11-28
Pft, no HTML. Sux0rz.
Rami C at 15:50 on 2006-11-28
Yup, sorry, for security-paranoia reasons there's no HTML in comments.
Guy at 14:30 on 2006-12-02
Hey Cassie - if you download that thing I directed Kyra to, and run it, my guess it you'll have it worked out in a matter of minutes. Failing that, if you run into trouble, say where you're stuck and I'll unstick you.
Kyra Smith at 11:21 on 2009-03-05
Guy, I've been playing with I7. I know I'm like so late to the party that everybody else is having breakfast the day after but it is totally blindingly brilliant, and the scope of the documentation alone is impressive. I also rather enjoy its links to Oxford - lots of the examples involve the Bodleian library :)

I'm not an absolute programming virgin - I can make up new excel formulae and I can knock together a pretty basic NWN module but I'm not a science guy, so most programming languages feel quite alien and awkward to me.

Let's be honest here, I7 is, as you say, just another language (and, as we know, any language is an abitrary construct anyway) but it does feel friendlier than the usual rows of and {{}}.

In case anybody is interested, there's a Totally Missing The Point article about it here on Twenty Sided.
Daniel Hemmens at 13:19 on 2009-03-05
Interestingly the comments on that article are actually overwhelmingly sensible (one person rather intelligently points out that since I7 is designed to allow people to write whole text adventures, the ease with which you can define a key with it isn't really the point - the commenter describes it as being like comparing different conventional programming languages on the basis of the ease with which you can program "Hello World").

Possibly the sanity of the comments is due to the fact that it was before Shamus developed his legion of fanboys.
Arthur B at 13:25 on 2009-03-05
Wow, that's a particularly bad article by Shamus's standards; he writes as though Inform were invented yesterday.

Does anyone know how wide the adoption of I7 is in the IF community? I can easily see a situation where people coming at it from a non-programming angle might prefer to use I7 whilst experienced programmers and folk used to the old version stick to I6.

(Irrelevantly, I'm really pleased with the image I found for the "PC Games" theme. The kid's all "Please, don't tell anyone about my vast collection of dating sims!")
Rami C at 18:44 on 2009-03-05
Oh. Wow. Indeed. How blinkered of him. He really obviously just heard "natural language", got up on his programmer's high horse about how hard true natural language processing is, and dumped on it. Besides, I7 is really I6 under the hood, so he can just use that if he wants, surely?
Arthur B at 22:18 on 2009-03-05
The article reads as if he is completely unaware that other versions of Inform exist, and indeed lacks any knowledge at all about the language's history. So he probably didn't know about I6.
Daniel Hemmens at 12:08 on 2009-03-06
More than that, it reads like he doesn't even know how Interactive Fiction works or, for that matter what natural language is (or what I7 means when it says that it uses it). He's basically complaining that I7 doesn't pass the Turing Test.

It's sort of like complaining that in a Democracy, everybody is supposed to have a say in who runs the country, but in fact you only get to have a say if you vote.
Arthur B at 13:06 on 2009-03-06
I'm mildly surprised that Young isn't better-versed in IF, since he's supposedly all about the story when it comes to games and IF has produced some of the best narratives I've seen (mainly, to be fair, in the big old homebrew scene, but there's some real classics that have come out of Infocom over the years). It would seem to be a genre that's tailor-made for him.
Daniel Hemmens at 13:20 on 2009-03-06
Like most people who are "all about the story" I tend to read Shamus as really being all about (a) things which make him, personally, feel awesome and (b) killing aliens.
Arthur B at 13:56 on 2009-03-06
He's pretty much directly confessed to (a) in previous posts of his, but I think he is at least partially sincere about prioritising story.

There was a flamewar that recently broke out in the comments section of his old Do It Again, Stupid post after it was linked to on some forums, and his posts make his thinking process more apparent: he hates it if he can't finish a game with a strong story element, because he regards games as being like other forms of story-based entertainment like movies and books - if he can't follow the plot to the end, the conclusion of the story is being denied him, and as a result he feels cheated.

Of course, getting to the end of the plot in a game is synonymous with winning, because most of the time the consequence of failure isn't a downbeat but satisfying conclusion to the tale so much as it's the action abruptly stopping midflow.
Daniel Hemmens at 15:06 on 2009-03-06
I think the basic problem is that "story" is a red herring nine times out of ten. Story or not, not being able to finish a game is frustrating.

Gamers of all stripes have an irritating tendency to use the word "Story" to legitimise their preferred mode of play (White Wolf and the Forge, I'm looking at *both* of you here).
Guy at 05:11 on 2009-03-07
Kyra, great to hear you're playing with I7 again! Yes, it is an amazing tool, and the documentation and the "natural language" aspect of it make it much much easier to get into than stuff from the world of curly braces. I've been thinking lately I'd like to do some game-making stuff and this has reminded me of how cool I7 is... perhaps I'll get back to working on that game I made 3 years ago!

Arthur, in terms of acceptance I think things are, more or less, as you describe. There are some people for whom the I6 way of doing things just feels more natural than the "natural language" of I7. But I7 has lead to a big influx of new people into the scene who had previously just hovered on the edges, and so a lot of the new games coming out are made in it, now. But some people have migrated over to I7 from I6 - Emily Short, for example. I think, also, while I7 is mostly just a "layer" over the top of I6, it does actually contain some new programming logic as well as the natural language stuff - something about "rule based programming", although I don't remember all that clearly what the deal is there.

Speaking of being "all about the story", has anyone here played "Linear RPG"? It's a recent parody of the story/gameplay relationship in RPGs and quite funny - and sadly accurate - to boot. You can find it here:

http://www.sophiehoulden.com/games/thelinearrpg/

I think in relation to the "do it again, stupid" stuff, the problem comes from the funny kind of hybridity that exists in games that combine narrative with procedural challenges. In a game like rogue or asteroids or pacman, the narrative is non-existent or irrelevant, and the whole purpose (and pleasure) of the game is to keep attempting the same difficult task again and again, trying out new strategies and learning new skills and gaining a feeling of mastery. In a game like Super Mario, this process of gaining skill is accompanied by the in-game reward of having a very simple narrative advanced as you become more capable of beating difficult challenges... but in a game like BioShock or The Witcher, or, indeed, any of the classic IF games, there's a much stronger narrative being developed than just "the princess is in another castle". Rather than the advancement of a cute little pseudo-story being a minor reward for increasing your skill, the story becomes the centre of the game, which means that the gameplay, rather than being engaged with for its own sake, becomes a kind of obstacle to the advancement of the thing that as a player you're really interested in. Various ways of adapting to this situation have emerged (puzzleless IF, RPGs that one can reliably win by grinding, &c) but there's something a bit... I don't know, weird, I guess, about their relationship to a game like asteroids. Because a puzzleless IF (like Photopia) is actually a lot like a short story, except for a few quirks in the way it is presented. I guess it raises the question, does this really need to be a game at all? Does being a game rather than story enhance it in some way? I think in most cases, actually, it does enhance it (which is why someone will play a game "for the story" where the story itself, if presented as a film or comic or novel or whatever, would seem totally bollocks) but why that is... well, I'm not sure, myself. Maybe having a game-like interface enhances cathexis?
Shimmin at 07:52 on 2009-03-07
I think because you have some involvement, people are prepared to play stories they wouldn't bother reading - even revealing a bit more of a quite rubbish plot is somehow a bit satisfying.

There's also the games like Myst, which combine pieces of story (which you literally read) with exploration and playing with nifty 'toys'. The fact that you can't back yourself into a corner or die is completely logical here; dying would really just be another, more time-consuming and irritating way to say "don't do that". It does mean, for me at least, that my tolerance for some things is reduced: because I'm playing to find out more about either the story or the world, I don't want to be hampered by grinding or skill-based problems. For example, one puzzle in Myst...IV? involved manually sounding a series of horns with precise timing through unnecessarily difficult mouse movements - which proved very frustrating for myself and Dad, even when we'd worked out exactly what to do.
In order to post comments, you need to log in to Ferretbrain or authenticate with OpenID. Don't have an account? See the About Us page for more details.

Show / Hide Comments -- More in November 2006