October 10, 2004

Hot Text - The IF Connection

After glancing over the contents of the Hot Text: Web Writing That Works book again, I found that I was making a profound connection between the "objects" of web design that Jonathan and Lisa Price mention and the objects of an interactive fiction game.

The Prices write that the best method for organization of content on a website is to break it up into "classes" of "objects," then make logical connections between the two.

Consider a procedure which tells you how to register on a website. The procedure is made up of steps, a class of objects that are meant to help the one viewing the website complete the procedure. Each step is an object, with a specific purpose... For instance, one may collect personal information on the user while the next enables the user to configure his or her preferences as a member of the website.

So, all of the components of a website can be broken up into these simple and easy-to-understand categories. Breaking them up into these divisions makes it much easier for programmers to code the XML (eXtensible Markup Language), which is a type of coding language that allows different parts of a website to be organized and "tagged" for easy reference by users; if you've ever used a search engine that displays only a small selection of text from an entire web page, text that was included in your search term, you have seen firsthand what XML is capable of. It enables these objects to be tagged with information that makes them easily recognizable by computer software such as browsers. XML is becoming more and more universally useful across the web, although it has yet to dominate HTML as the predominant form of markup language.

So what is the connection between XML, objects, and interactive fiction?

Well, first of all, XML is extremely useful in writing interactive fiction because, as the Prices discuss, it allows "processing software like parsers and browsers" to be "lightweight." IF uses a parser program such as WinFrotz in order to interpret the code of an IF game and allow the reader to interact with it quickly and easily.

Also, a common feature of IF game programming is, in fact, the object. Objects in IF can be anything, from a location (deep in a forest) or something smaller and capable of being carried by the player (torch). Each object has its own distinct description and set of attributes, just like the objects that the Prices define. This makes it possible for the parser/interpreter (WinFrotz, for example, again) to determine which information the player should be given and how the player should be able to interact with the objects.

I was surprised by my own findings this time, and I feel that I have come to a better understanding of both XML and interactive fiction thanks to Hot Text's insight.

Check out SourceForge.net's page on IFML (Interactive Fiction Markup Language), which, they state, is based upon XML.

Price, Jonathan and Lisa. Hot Text: Web Writing That Works. New Riders, 2002.

Posted by ChrisU at October 10, 2004 11:39 PM
Post a comment

Remember personal info?