Foreword

Somebody once said that if you ask five poets to define poetry, you’ll get seven definitions. I’m sure I’m misquoting wildly — the original version may not have been about poetry at all — but the point should be clear. There are undoubtedly more good ways to explain the intricacies of the Inform 7 programming language than there are people who have written tutorials on the subject.

This book makes no claim to being the ultimate guide to Inform 7. On the contrary: A number of topics that experienced Inform authors (or new authors who envision unusual types of gameplay) may want or need to know about simply aren’t included in The Inform 7 Handbook, or are mentioned only in passing. The purpose of this book is to give first-time authors the kind of information and insight that they’ll need in order to start using Inform 7 to produce parser-based interactive fiction in its most familiar form, without getting tangled up in a lot of complexities. (If you don’t know what I mean by “parser-based,” keep reading.) This version of the Handbook is current with respect to version 6L38 of Inform 7, and may not be accurate with respect to older or more recent versions.

I’ve tried to organize the material in ways that will help newcomers find useful information quickly. I’ve attempted, as well, to write in a way that makes few or no assumptions about what the reader already knows. If you read the Handbook page by page from start to finish, you’ll spot a few repetitions; I felt that some minor redundancy would be better than forcing readers to hunt for information.

Inform 7 (“I7” for short) comes bundled with two long and detailed tutorial/reference books, Writing with Inform and The Inform Recipe Book. These books are found under the Documentation tab in the Inform application — and they can also be read online at WI_link and RI_link. The online versions are not much use if you have the Inform application open, but they can be very handy if you find yourself wanting to brush up on your Inform by reading on your phone while riding on a train. Before getting too far along in the process of writing a game, every Inform author should read the Documentation! Several times, in fact. That’s the best way to get familiar with the power of Inform.

Some aspiring authors, however, find the Documentation a bit daunting. At times the Documentation seems to assume that a gentle nudge in the right direction will be all that readers will need. Step-by-step instructions, cross-references, and full discussions of the myriad details that authors may need to have at their fingertips are not always provided. Clearly, there’s room for a different approach.

The Inform 7 Handbook grew out of my experiences teaching younger students (ages 10 through 15) to write interactive fiction using Inform 7. When beginning students asked me how to do the kinds of things that beginning authors naturally want to do, I sometimes found that the information they needed was scattered through the Documentation, making it hard to find and hard to put together into a clear mental picture. Figuring out how to do some of the most basic real-world programming chores strictly by reading the Documentationmay take a bit of study. I’ve heard comments about this from adult newcomers as well.

In The Inform 7 Handbook, information is organized into chapters by task. Chapter 2 is about making rooms, Chapter 5 tells how to create characters, Chapter 6 has ideas for designing puzzles, and so on. None of the chapters is intended to tell you absolutely everything about a given topic that you might want or need to know; after (or while) reading a section of the Handbook, you’ll often want to refer back the Documentation. I’ve included cross-references in many places to show what pages you should consult.

Inform 7 is not the only programming language available for writing interactive fiction. Its main competition (if free software can be said to compete) comes from TADS 3. Version 3 of TADS (The Adventure Development System) is, in some ways, more sophisticated than Inform 7, and Eric Eve’s marvelous alternate library for T3, which goes by the name adv3Lite, streamlines some of the difficulties that make TADS intimidating. adv3Lite borrows a few useful ideas from Inform 7, in fact. Nonetheless, the TADS programming language is as different from I7 as night and day. TADS 3 closely resembles traditional programming languages such as C. (If you don’t know what that means, don’t worry about it.)

Inform, TADS, and a couple of other authoring systems trace their ancestry directly back to Crowther & Woods’ “Adventure,” a text-based game that ran, initially, on mainframe computers in the 1970s. Today this type of interaction is called parser-based, because the reader/player types commands (such as GO NORTH or GET LAMP) that are processed by an internal routine called a parser. More recently, a very different type of interactive fiction, sometimes called choice-based, has become popular. In a choice-based fiction, the reader/player is relieved of the burden of having to think what command to type; instead, the story presents a few links that can be clicked or tapped to move matters forward. Inform can be used to produce clickable choice-based interactive fiction, but you won’t find much about that concept in this book, because I frankly don’t find choice-based fiction very interesting. To me, the fictional world of an interactive story is much more engaging when the reader/player has to figure out what to do, rather than being presented with a cut-and-dried menu of choices.

The “natural language” programming interface of I7 makes I7 very attractive to those who would like to write interactive stories but have no background in computer programming. Also, at this writing the TADS 3 development environment, Workbench, is a Windows-only application. TADS games can be played on the Mac or on a Linux computer, but the slick development tools are Windows-specific. For classroom use, Inform 7 is a better choice not only because the “natural language” aspects of the system may be easier for the newcomer to understand, but because it makes no difference whether a given student uses a Macintosh, Windows, or Linux computer.

Inform games can be located on websites and played within a Web browser such as Safari, Firefox, or Internet Explorer using systems called Parchment and Quixe. (Internet Explorer seems to be a poor choice for running Parchment and Quixe, in my limited testing. This is probably because Parchment and Quixe are written in Javascript, and Microsoft uses a non-standard implementation of Javascript in IE.) When you’ve finished writing your game, these tools will make it easier than ever for you to share it with players and fans. In fact, Inform allows you to release your game in the form of a web page, so it will be ready to go — assuming you have a website to which you can upload it.

If neither the no-compromise complexity of TADS 3 nor the friendly but sometimes fuzzy approach of Inform 7 appeals to you, you can also investigate Inform 6, which is a completely different and much more traditional programming language, although it shares the “Inform” name, or a simpler system such as ADRIFT or ALAN. ALAN is cross-platform (Mac, Windows, Linux); ADRIFT is Windows-only. The full version of ADRIFT is not free, but it’s very affordable.

A simpler option for writing interactive stories would be to use a choice-based authoring system. Several are currently available, including Undum (http://undum.com), Twine (http://gimcrackd.com/etc/src/), and ChoiceScript (www.choiceofgames.com/blog/choicescript-intro/). Choice-based stories are sometimes referred to as CYOA (choose your own adventure), because their ancestry goes back to a flurry of CYOA paperback books that was published in the 1970s. CYOA stories are not puzzle-oriented, but some of the authoring systems are much easier to use than Inform. (This is not true of Undum, by the way. Undum is quite a lot harder to learn than Inform, but allows the author to do wonderful effects.)

All of these systems, and others, are available for download on the Web.

Like Inform itself, The Inform 7 Handbook is free. I hope you find it useful. If there are areas where you feel it could be expanded or improved, I hope you’ll fire off an email (good email addresses are midiguru23@sbcglobal.net and editor@musicwords.net) and let me know what you’d like to see. Updated versions may be released from time to time.

— Jim Aikin

Livermore, California

May 2015