Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Quixe] Hack to Plotkin's Quixe brings javascript to int-fiction

50 views
Skip to first unread message

Leonardo

unread,
Apr 5, 2013, 12:10:13 PM4/5/13
to
A simple hack to Andrew Plotkin's Quixe brings the power of javascript in IF written for the glulx VM.
In a few words, a game that is played on-line or off-line in a browser can call javascript code and show the results in the output shown to the player.
The trick is done with a simple modification of the "say" command.
As seen in this on-line demo http://milleuna.3owl.com/_Javascript_DEMO/
this Inform7 line
say "I'm pretty sure that 2+2 makes $<2+2>$."
generates this output
I'm pretty sure that 2+2 makes 4.
where 4 is computed by javascript.

This is not the best example to uncover the possibilities of this simple hack, but I'm "pretty" sure that someone can figure out something more useful ;)
0 new messages