Interactive Fiction (Text Adventure) Creator

Miscellaneous Forums/General Discussion/Interactive Fiction (Text Adventure) Creator

I came across a very interesting approach to text adventure game creation yesterday: Inform. What's exceptional is that the latest version uses natural language, rather than a more-formal programming language, to create interactive fiction.

In older versions you'd write stuff like:
Object Kitchen "Kitchen";
Object Front_Door "Front Door";

Object Living_Room "Living Room"
   with
      description "A comfortably furnished living room.",
      n_to Kitchen,
      s_to Front_Door,
   has light;

Object -> Salesman "insurance salesman"
   with
      name 'insurance' 'salesman' 'man',
      description "An insurance salesman in a tacky polyester suit.  He seems eager to speak to you.",
      before [;
         Listen:
            move Insurance_Paperwork to player;
            "The salesman bores you with a discussion of life insurance policies. He hands you some paperwork.";
      ],
   has animate;

But in this new one, you write like this:
The Living Room is a room. "A comfortably furnished living room."
The Kitchen is north of the Living Room.
The Front Door is south of the Living Room. The Front Door is a closed locked door.

The insurance salesman is a man in the Living Room.
The description is "An insurance salesman in a tacky polyester suit. He seems eager to speak to you."
Understand "man" as the insurance salesman.

Instead of listening to the insurance salesman:
   say "The salesman bores you with a discussion of life insurance policies. He hands you some paperwork.";
   now the player carries the insurance paperwork.

I've downloaded and tried it, and I'm impressed by its simplicity, power, and easy learning curve (with tons of examples). Naturally you still have to learn the vocabulary and how to employ it (which can be a little tricky: learn about "called" to avoid frustration), but it's a lot easier and more-forgiving than traditional programming. Free downloads for Mac, Windows, and Linux are here, and details of what it provides are here and here.

Heh, now I want to write a really high-level game-creator language/interpreter using BlitzMax...


Hello.

Looks interesting, and also something that would benefit from a GUI to generate the syntactical wrapper around it. Nice find.

Goodbye.

It's a really nice approach. Does the programmer have to type in all that code, or is it bolted together with a GUI? I can somehow imagine more typing errors cropping up in that than with a more conventional language.

It's currently typed into an IDE. But the GUI suggestions are good ones: that could provide a "guided tour" through the syntax to reduce errors. I don't know that it's practical for the full richness of the language, but it might be very handy for beginners with it (like me <g>).


interesting! weirdly I prefer the first approach though as I'm able to understand what's going on more easily.

I prefer the first approach though as I'm able to understand what's going on more easily.

Inform 7 (the current version) allows Inform 6 code (the first approach above) to be used via "Include". I haven't tried it, but it looks like you can use Inform 6 code wherever it's easier to do so (or, presumably, write the whole thing in it if you like). So, it seems like the best of both worlds.

I was stunned to see how advanced adventure-creation programming language (at least this one) has become. And yet, it can still produce files that run on the various Infocom Z-machine interpreters.


Yes it certainly looks very clever the new approach! I'm just too much a programmer :-)

Very interesting, I like the object-based approach to handling things.

I created something similar to handle adventure games - basically I have several spreadsheets, to handle things like:

1. Objects
2. Rooms
3. Characters
4. Dialogue
5. Action scripts
(and more I can't remember)

Each of which is like a database table. It does work, but it's tricky to keep everything in sync. I think object-based would work better.

Things seem to have progressed since the days of The Quill, P.A.W., et al.

Adventures where my favourite type of game, back in the 8 bit days. I even wrote a few myself. Happy days. :)

Yes, Inform 7 has been out for many months now. I was just as excited when I saw the new language, but like mtricks said, it's not nearly as easy as it appears. Due to it's English-like syntax, it makes it too easy for you to just start typing sentences in and hoping they will compile. Unfortunately, chances are they won't. You really have to learn the syntax before you can do anything with it - it doesn't come naturally.

So I actually agree with what Grey Alien said; I prefer Inform 6 to Inform 7. When I learned Inform 6, it was a fairly logical language and I understood how everything would react in the game when I compiled it. Making an IF game with it was easy and fun. Inform 7 promised even easier and more fun programming, but I was somewhat disappointed that it didn't understand enough English sentence styles to be able to make programming with it natural.

In my opinion, if there is ever going to be a successful English-based programming language, it's going to have to understand practically every phrasing and even be able to make assumptions. Unfortunately, no such language exists, but while Inform 7 does come impressively close, the fact that it falls short of understanding all English does make it a little cumbersome to program in (IMO).

Instead of re-wording a sentance a hundred times to see if the compiler understands, I'd much rather learn a strict syntax which both me and the compiler understand without ambiguity.

I remember playing that port of the Zork game on the PC a while back. Don't i ever made it out of that white house though...

I had a look at Inform 7 when it came out and was overjoyed to see that they had made it just as infuriating to author text adventures as to play the blasted things. Poetic justice.

OMG...
I was looking for something like this two days ago....
...And here it is....
<looks around nervously>

Perhaps I should convert my novel into a text adventure.