Thursday, August 26, 2010

Creating Interactive Fiction with Inform 7 Table of Contents Posted

Amazon has posted the Table of Contents, Index, and first few pages on their website for Creating Interactive Fiction with Inform 7. Click on the cover or "Look Inside!" to view this material. They'll begin shipping copies out tonight and tomorrow.

Tuesday, August 17, 2010

Official Book Website

The official website for Creating Interactive Fiction with Inform 7 is now online. This also means the book's example game, Sand-dancer, is released: it can be played online and downloaded. As previously mentioned, this is a real interactive fiction that you'll build line by line as you progress through the book. Versions of the story as it exists at the end of each chapter are on the website for those who aren't up for quite that much typing.

Amazon lists the book as shipping tomorrow, which means it's quite possible some of you will see it in print before me. On a related note: if anyone with the ear of an audience who might be interested in this sort of thing is interested in a review copy, let me know.

Saturday, August 14, 2010

Blue Lacuna Source Code

Something I meant to do a long time ago, before grad school intervened: the source code to Blue Lacuna is now publicly available as a browseable webpage, downloadable PDF, and compileable archive.

The archive contains all of the extensions necessary to compile, including snapshotted versions of third-party extensions as they existed at the time of its release, as well as all of the internal extensions I used when creating it. You'll need to use an older release, Inform 5Z71, to compile. Other instructions and snafus can be found in the archive zip file.

I'd originally planned to also offer the source in the printed book form I showed off at PAX East, but a frustrating series of technical difficulties with various print-on-demand publishers has led me to give up on this project for now. This may be for the best: I don't expect Progue would care much for being immortalized in the form of a dead tree, anyway.

My goal in distributing the source is not to model well-written Inform code, which it certainly is not: I was learning the language as I went along. Rather, I hope it will be of use and interest both as a record of the story's creation and a window into the pathways and choices not taken in your own traversal.

In this same spirit, I've also posted an archive of bonus material related to this project's three-year design process. This includes some of my original design notes, early versions of the source code, world-building exercises, and collected reference images.

With these two things out of the way, I'm hoping to finally move Blue Lacuna out of my "active projects" directory where it's been lingering for well over a year and a half now. Bigger and better things are coming soon!

...well, at least better things.

Monday, August 9, 2010

Best Practices in IF

Whenever we code, there are both formal rules we must follow and informal habits we adopt to make things easier on ourselves. These "best practices" are common in mainstream programming textbooks, but have received less attention in the IF world than perhaps they deserve.

One of the most common, nearly genre-defining parser errors is the dreaded "You can't see any such thing," which all too often appears in reference to something the story just narrated your character seeing. In Chapter 4 of my upcoming Inform 7 book, I introduce an IF best practice called BENT designed to help minimize this problem. Those who want to get BENT should Bracket Every Notable Thing in descriptive text: make every object that could sensibly be interacted with by the player a text substitution.

The description of Base of the Tower is "Behind [the building] [a steel girder] rises from [the sand], one of three legs of [the huge electrical tower] looming like some gargantuan spider into blackness above you. [A tumbleweed] drifts lazily against the rusted metal among [scrawny weeds] and [bits of trash]. The desert stretches in all directions except back south towards the building."

Why would you do this? To mangle a metaphor, it keeps you from writing nouns your parser can't cash. Now, it's not just a game-level problem that "EXAMINE GIRDER" is not a recognized command: you've made it a compiler-level problem, too. Having told Inform that something called "the steel girder" exists in your story world, it won't let you compile your story until you've created that object, instead giving you a problem message explaining that it doesn't yet exist.

More importantly, BENT forces you to think about the gameplay implications of the words you type. If you're describing the piles of trash, and you write something like this:

The description of trash is "Aluminum pop cans, newspaper pages, plastic bags, and other junk rest in precarious piles underneath the steel girder."

...bracketing all that stuff may cause you to realize that you're just creating a lot of red herrings and frustration for both yourself and the player. Instead, you might refine your description to this:

The description of bits of trash is "Worthless and forgotten, drifting against snags like non-biodegradable snow."

...which requires nothing to be bracketed, and correctly signals to your player that this item is not important to the story.

What counts as notable is subjective, of course. In this example I've left out "gargantuan spider" since it's part of a metaphor (the player really can't see any such thing) and "blackness" since it's an abstract concept. Synonym words like "legs" must be dealt with differently, too (through Understand rules). But the hope is that adopting BENT will get you in the habit of looking for ways to keep the parser's mental model of the story world in line with the player's.