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 GutHub 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:
[code]> npm install -g local-web-server
ws
[/code]
Then open a browser and use the url: localhost:8000.
This will display the story. Note that everything in this web page is directly placed in HTML. This is the template:
The results!