Vorple version 3.2 is now available (download here). This release focuses mainly on the JavaScript tools and improving some basic interpreter features, which lets authors more easily modify interpreter behavior. A major refactoring under the hood is moving from Git to Quixe as the base interpreter, which significantly improves loading time and JavaScript execution time, and decreases the overall package size.
Major new features are tools to exchange virtual files between JavaScript and the Inform game, and input/output filters and event listeners which can be used to observe and modify player’s input and the game’s output. The interpreter also handles save/restore better, with separate prompts and a list of saved files when restoring instead of having the player remember and type in the filename. The full lists of new features: JavaScript library, Inform 6 libraries and Inform 7 extensions.
Currently installing and developing with Vorple and distributing games is much too complicated, especially compared to how easy the Inform 7 IDE makes starting a new I7 project. We’re focusing next on making major improvements there.
We’ve made a bugfix release 3.2.1 that addresses issues with Inform 7 not recognizing the interpreter handshake and spawning runtime errors because of that, and issues with Inform 6 games that request Unicode input, mainly for the Russian Inform library. The downloads are available from https://vorple-if.com/download.html.
I am not sure if this is the right forum for this, but can someone help me with adding event listeners to events like restart and restore in vorple. The documentation examples don’t work for me.
There are no specific events for restart and restore so any Javascript code needs to be triggered from Inform or at page load, so the exact way to do it would depend on what you’re trying to accomplish.
I want to redirect a player to a different webpage when they quit out of the game, exactly like the example on this page: https://vorple-if.com/docs/listeners.html. How do I go about doing that?
The example in the documentation works as it is, I just tested it. How are you including the code? It should be in a separate Javascript file and included with Release along with Javascript "filename.js". (I7) or included with a <script src="filename.js"> tag in the HTML file (I6). Another option is to evaluate it in Inform (I7 example:)
When play begins:
execute JavaScript code "function redirectAfterQuit() {
window.location.href = 'https://vorple-if.com';
}
vorple.addEventListener( 'quit', redirectAfterQuit );";
There isn’t anything that would prevent using Bootstrap or that could cause conflicts, it’s just CSS. First check that it works in a plain HTML file and once it’s working there copy it to the Vorple index page. Make sure you don’t include jQuery since it’s already included in the Vorple library.
wow, 20 minutes with Vorple and I’m already feeling that once you go Vorple, you’ll never go… there’s not much of anything that rhymes with Vorple so let’s just say “back”.