Cathode Tan - Games, Media and Geek Stuff
logo design by man bytes blog

Thursday, March 30, 2006

New Form IF: Brief Overview

As I get The Case Of Randolph Carter in front of The Girl and The Brother, it's probably a good time to run through a bit more of what exactly it is before I do a wider beta or release.

To recap: traditional interactive fiction comes in one of two forms. One is strict hypertext, a series of pages linked together and the reader follows specific paths by clicking on those links. This is similar in structure to a Choose Your Own Adventure with the added benefit of hyperlinks. It's not terribly popular. One reason, I think, is that the "hypercard" style of organizing a story gets problematic and hence, typically, the stories themselves aren't very good. There might be some that are pure gold, but I haven't found many.

The more common format is the storyworld parser ... the one we all know from Infocom. This is a real interface which accepts input, performs logic and reports output. Areas are divided into sections which can be navigated and objects within the story have properties the parser understands to determine the appropriate reaction (can it be picked up? is it open? etc.). The environments can be complicated and interactive, provided they are developed that way.

This is how one scene from Randolph Carter might play out in a normal storyworld parser:


Ancient Valley
The swampland dips into a short valley and aside from a few stenciled shadows of possibly ominous origin, there is nothing to detail why this area captivates Harley. Your footprints lead to the south and Harley is slowly moving into the valley, northwards.

A new stench becomes perceptible over the old odors of rotting vegetation. It's an aroma that combined with the fetid swamp assaults the senses to examine the valley more carefully.

> smell stench

It is the smell of rot abound, of stale age and of lonely abandon - like some substance from outside this world was released into the air.

> complain about stench

"Ugh. Oh. Lord in Heaven," you exclaim, "Lord. That is not a smell for mortal men to endure, my friend."

"Perhaps," Harley responds threateningly, "you should consider heading back on your own."

>


What I've been playing with would behave in a moderately similar way. However, instead of a parser ... the user double clicks on the word they want to try and interact with .... here "stench"... and they're offered a prompt with options like "smell stench". "Complain about" isn't available at first, because Carter hasn't realized how bad is the smell. When they make a selection, the text is updated with pertinent information or reaction. So the sum of the page after "smell stench" would look like:


The swampland dips into a short valley and aside from a few stenciled shadows of possibly ominous origin, there is nothing to detail why this area captivates Harley.

A new stench becomes perceptible over the old odors of rotting vegetation. It's an aroma that combined with the fetid swamp assaults the senses to examine the valley more carefully. There is the smell of rot abound, of stale age and of lonely abandon - like some substance from outside this world was released into the air.


Post-interaction, updated text appears blue and then fades back to black to indicate the change.

There would also be no descriptions of geographic direction ... the story progresses one page at a time and while certain actions might end a page prematurely for another page, the user couldn't just "go north". The point of this page is to give the reader leading information before Harley and Carter get closer to their goal. If a storyworld wanted to stall the reader so that they'd get all the information it would have to specifically tell the user things like "Perhaps you should investigate before proceeding" in order to stall them. Removing the geographic nature of a storyworld allows the page to behave just like a page, and not necessarily a location.

The distinction from the development side of things is even more severe. There is javascript to serve as a traffic cop about what should be showing and to keep track of flags like "is Harley still alive" and score to maintain state across pages, but that's about it. The only object that the script talks to are words and pages themselves. So the stench exists as:


odor = new Word("odor","smell|complain about","odors|stench|aroma|smell");


Which defines the main keyword, potential interactions and synonyms. When a user attempts an interaction, the script tries to find places within the HTML which fits that verb-noun (or synonym) pairing and shows that. The script will also execute any additional javascript tied to that section of HTML. So when a section is shown, the script make other sections available, adjust the score, update flags, etc. This is several orders of magnitude less complicated than fitting objects into a storyworld parser.

So that's the nickel tour. Don't know if it helps or not, to be honest. I know it's hard without a live example, but hopefully I'll get that in shape soon.






tagged: ,

No comments: