Writing with Inform 7

Last year, I taught myself the basics of writing Interactive Fiction using Inform 7. I did it to create one of the pieces of bonus content for Azrael’s Stop, a short game called Dreamscape. A couple weeks ago, Sara Thacher and Lorraine Hopping expressed interest in the process of doing so, so I thought I’d write a little post.

What is Inform 7?

For those who don’t know, Interactive Fiction is the term used to describe story/games like the classic old text adventure games, like Zork. Rather than using a graphic interface to play a video game, it was all text based — the game would say “You find yourself in a room. A door leads north.” and you would type in “go north” (or just “n” for those who knew the shortcuts). And you would type “examine sword” and “use sword on troll” and “attack troll” and “tie rope to railing” and “climb down rope” and things.

Inform 7 is a natural language programming language for creating Interactive Fiction. That is, it’s a tool specifically designed for people like me to use to write games/stories like Zork. It’s incredibly intuitive, though still requires a lengthy guidebook, and that guidebook is very comprehensive and well-laid-out. The fact that it uses so-called natural language means that I can type a line of code that says “The Pantry is a room west of The Kitchen.” and it will know to create two rooms, one called The Pantry and one called The Kitchen, and make it so that if I’m in the Kitchen and type “go west” I will end up in the Pantry.

So basically, it’s pretty cool.

Creating Interactive Fiction with Inform 7

Sara was most interested in the actual process of learning Inform 7 and how it shaped what I made. It’s an incredibly versatile language, from what I saw of it. Anything you could want to do in an interactive fiction game, you can figure out a way to make it happen using Inform 7. The documentation is extensive — there’s both a guidebook, Writing With Inform, which teaches you from basics to advanced functions how to use Inform 7. The Recipe Book is organized by what the author wants to accomplish, making it a good reference in the middle of programming.

It does make for a learning curve, though. You certainly can’t just jump in and expect everything to work — or expect to know how to do everything you want. There are a lot of possibilities, and a lot to learn.

When I wrote with it, I was trying to create something pretty specific, but pretty small. I learned the basics, and then any advanced function I needed, I figured out as I worked. The resulting game certainly isn’t very complex as far as Interactive Fiction goes, and it made for some very frustrating moments for me as I tried to figure out how to do something I thought should be simple, but overall worked pretty well.

I would recommend spending as much time as possible learning the language and practising with simple test games before launching into the main thing. You know, that structure and patience that I don’t have. (I just wanna make it!)

Programming

It’s important to remember that even if Inform 7 uses natural language, it is still a programming language. It is not a human. It requires a very specific syntax to understand what the hell you’re talking about, and yes, a misplaced semicolon can cause a huge error that leaves you searching through lines of code for an hour until you realize how stupid it was that you missed a semicolon just there.

Inform 7 made me appreciate my programming friends a little more.

So it’s nice, and it’s pretty easy to figure out for all its natural languageness, but it’s still a programming language.

Shaping What I Made

Page 1 of 2 | Next page