Friday, 10 November 2006
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:
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:
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
From which we can derive a game with the following transcript:
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.
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.
Themes: Computer Games
~
bookmark this with - facebook - delicious - digg - stumbleupon - reddit
~
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.
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.
Possibly the sanity of the comments is due to the fact that it was before Shamus developed his legion of fanboys.
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!")
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.
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.
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).
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?
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.