Sunday, June 12, 2016

Web Interactive Fiction: FyreVM-Web Cloak of Darkness with JavaScript UI

Web Interactive Fiction: FyreVM-Web Cloak of Darkness with JavaScript UI

http://ift.tt/1U867RI

This culminates over a year of work, transitioning FyreVM to a web format using TypeScript (glulx-typescript), creating the EngineWrapper state machine, creating the page manager FyreVMWeb, the content transformation system, and then updating the I7 extensions to use formal objects for channel definitions.

Channels can now be added very easily:

my-channel is a channel with content name “myChannelContent” and content type “text”.

You write to that channel using say:

say “[on my-channel]This text will show up in my new channel.[end]”;

This text will show up in fyrevm.myChannelContent in the script of the web page.

The title is misleading since the the VM and the page manager are written in TypeScript, but the html page itself is scripted in simple JavaScript.

The example implementation uses Cloak of Darkness, which only seems appropriate.

Everything you need is included in my fyrevm-web repository, although the projects\Cloak of Darkness folder is entirely self-contained. That’s all you need to run the example.

To do so you’ll need to install Node and TypeScript.

Once you have those installed, open a command line prompt at:

(your local file system)\fyrevm-web\projects\Cloak of Darkness\javascript

run:

> TSC

You’ll also need to run the app from a server. This is easy enough:

> npm install -g local-web-server
> ws

Then open a browser and use the url: http://localhost:8000.

This will display the story. Note that everything in this web page is directly placed in HTML. This is the template:

 

To make this “ready for prime time”, there’s still a lot of work. Most authors would want more pre-built components and a more fully developed standard template. I have a list. Feel free to send me suggestions.

Add a Comment




Gamebook blogs

http://ift.tt/1U867RI
via Planet Interactive Fiction http://planet-if.com/

June 12, 2016 at 02:17PM

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.