-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
examples for using ifvms.js (client side + maybe server side too?) #10
Comments
Only got time for a quick answer right now, sorry! Take a look at https://github.com/curiousdannii/ifvms.js/blob/master/dist/bootstrap.js to see ZVM being used in node.js. It's designed to be used with Web Workers (though it isn't yet...), so everything happens with two functions: ZVM.inputEvent() and ZVM.outputEvent(). |
awesome! thanks for the pointers. this looks really promising! |
|
You'll want to write your own event handler... the bootstrap one is very simple because I know what events it will produce. runner.js (in Parchment) handles quite a few more, as does api.js in the same folder. The read event needs a number of other properties, which is why I add the response text on to the original event object and then give it back to the engine. Which now that I think about it is a really poor design... you should be able to just send back the response text by itself. I'll get around to changing that, eventually. |
We can close it here - I've started to work something out - See https://github.com/jedi4ever/ifplayer.js , still could use your guidance obviously! |
Sure thing, ask anytime. The parchment Google group is probably the best place. |
Hi @curiousdannii , over the last weekend I've taken a great interest in Interactive Fiction.
I'm building a work situation simulator and would love to use ifvms.js or other javascript framework to 'play' these kind of situation.
From the code, it's hard to understand how to embed/use ifvms.js in your own code. It would be great if you have some examples to load it
I could not tell if the code only works inside a browser environment or you could also use it in a nodejs backend process that emit events that could be visualised through socket.io on the browser.
I've seen you have some tests, but from what I can judge the are running inside the browser?
My idea is to :
Any hints you can provide here are greatly appreciated!
The text was updated successfully, but these errors were encountered: