June 29, 2008

Learning How to Write Interactive Fiction

Yesterday I tried learning Inform 7.

I’m not sure how I feel about the documentation for this language; on the one hand, like its predecessor, the DM4 for Inform 6, it’s extremely thorough and well-written. On the other hand, one aspect of the DM4 that made it among my favorite programming books—perhaps one of my favorite books, period—was its exercises, which made experiencing the book fairly interactive. The act of reading a relatively short amount of text and then putting one’s newly-found knowledge to use in the solving of a difficult problem not only helped reinforce the knowledge for me, but it was also fun. On top of this, many of the exercises involved implementing features found in classic works of interactive fiction, which gave the experience a fascinating historical dimension as well; as such, the book was almost like a work of “interactive nonfiction” in and of itself.

This is actually not unlike what I enjoyed about the better mathematics textbooks I used in college, which interspersed information with theorems that the reader had to prove in order to move forward, as the book used the theorems in later chapters. It almost made it feel as though the reader was on equal terms with the author, that they were in some way writing the book together. Proving these theorems had a historical dimension to them as well, since they clearly had to be completed by mathematicians years ago in order to arrive at the understanding of mathematics we have today.

The Inform 7 manual, in contrast to the DM4, features non-interactive examples instead of exercises, which makes the book a little less compelling to read. It also makes the book feel a bit more overwhelming, as my understanding of the language being taught isn’t constantly put to the test the way it was in the DM4.

I get the impression that this was intentional. When reading the DM4, I didn’t really have much of an idea of what kind of IF I wanted to write, and indeed, I never actually wrote any after finishing the book and doing all the exercises. Inform 7, on the other hand, seems focused on actually getting authors to write what they want with as little training as necessary.

This makes sense to me; good adult literacy programs don’t bog their students down with rules of grammar and spelling, foregoing the red pen in favor of placing primacy on first getting the student to actually enjoy expressing themselves through writing. In that vein, perhaps it’s wise to not distract the reader with interesting yet ultimately pedagogical examples that cause them to focus more on the mechanics of interactive fiction rather than the actual content.

The design of the language itself makes sense in this vein, as Inform 7 looks much more like natural language—which is the actual domain of interactive fiction—than its predecessor, Inform 6, which looks much more like a dialect of C. But I’m not yet sure what this means for me; I think I’m going to try just writing a story without reading any more of the Inform 7 manual, and only use the manual for reference, when I need to do something that I have no idea how to do.

© Atul Varma 2017