Fiction is a Three-Edged Sword

Fiction, interactive fiction and narrative

Interactive Parsing extension, version 1


Version 1 of my I7 extension for real-time input parsing, as demoed last week, is now available to download and try out in your projects.

Getting it to work should be a simple matter of including the extension, though you’ll also need to download and install Text Input-Output Control by Erik Temple, and Flexible Windows. You won’t need to include these in your project.

This is IP version 1, and it’s complete barring one glaring oversight – disambiguation questions asked by the parser will not be understood, not be error-checked, will offer strange suggestions and then, as if all that wasn’t enough, will put the new text in the wrong place in the input buffer.

I’m looking into a quick fix for this first off, before implementing a proper solution, but I wanted to get this extension out there in case people are interested in looking at or improving it. I’m particularly interested in anything that can be done to speed up performance.


Author: joningold

Jon Ingold is a writer and games designer from Cambridge, UK. He is co-founder of inkle, a company specialising in interactive narrative for mobile devices. He has written prose, plays, short films as well as interactive fiction, both in hypertext and parser-based systems. His short stories have appeared in Interzone magazine and his IF works have won competitions and awards.

5 thoughts on “Interactive Parsing extension, version 1

  1. Very interesting; I’ll be following this closely!

  2. The heavy glk usage will slow my adaptation, so I may have to reinvent it in fyrevm. But the basic premise should stillmwork with the right client side controls.

    • Yeah, I’ve had to build it all up from quite a low level. If I were you, I’d try to implement as much as possible in whatever “real” language you’re using!

      Taking these ideas forward, I think interpreters should be aiming to do this kind of thing: they’re faster than the gamecode, they have better UI facilities and offer more interface options.

      If this extension has a moral it’s, look, this stuff is possible.

      So you should probably do the input loop yourself, throw input down to the parser, get it to report the number of words understood (see the Advance Parsing section), then @undo the game state. And do it all over again. 😉

      • See Zifmia has the capability of doing most of that now. I cache the engine in a database. It takes two seconds for commands to get sent to the server, the engine to be pulled out of the database, deserialized, execute the command, serialize the engine, serialize the game save file, save back to the database. The save game file is stored per turn while the engine is always at the latest turn. But no matter what, I can run any number of commands without any concern for the engine state. I can toss it after querying it over and over.

        So I just need to look into Advanced Parsing and I should be able to figure out the rest with AJAX calls.

  3. Pingback: Interactive parsing update | Fiction is a Three-Edged Sword

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s