Client Server FyreVM

Posted: May 29, 2010 in Blogroll, interactive fiction, Textfyre
Tags: ,

I spent the last week working on a wrapper for FyreVM that allows it to be used statelessly in a web page. The results, although not pretty, are at

The wrapper will start up the game, restore the previous state, execute the command, grab the startup text, and return this in an XML blob. I created a simple web page to extract the channel data and write it out. I even included javascript functionality to click on directions.

The Inform 7 game source looks like this:

“Zifmia Test” by David Cornelson

Include Version 3 of FyreVM Support by Textfyre.

Use full-length room descriptions.

When play begins:

change prompt to ” “.

The Kitchen is a room. “You are in a kitchen. The bedroom is <a onclick=’javascript:command([‘]east[‘]);’>east</a>.”

The Bedroom is east of the Kitchen. “You are in the bedroom. The kitchen is <a onclick=’javascript:command([‘]west[‘]);’>west</a> and the bathroom is <a onclick=’javascript:command([‘]north[‘]);’>north</a>.”

The Bathroom is north of the Bedroom. “You are in the bathroom. The bedroom is <a onclick=’javascript:command([‘]south[‘]);’>south</a>.”

* * * *

I haven’t implemented this as a service yet, which will allow me to implement the controls us jQuery and AJAX calls, but that’s more of a design thing. I wanted to first show that FyreVM can be used as a back end to a web application.

All of the code, Inform 7 project, and web project are at in the FyreVM project.


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 )

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s