![]() | Chapter 23: Releasing | ![]() ![]() |
23.11. A playable web page |
Modern web browsers are now so powerful as computing environments that they almost amount to general-purpose computers in their own right. The websites made in the previous section were passive, and simply displayed information about a story file. But it's also possible to make a more active page - one which can play the story file, right inside the browser, for anybody who visits.
To make such a page, we must:
Release along with an interpreter.
This automatically releases along with a website as well, since we need the website in order to house the new page, which will be called "play.html". This page will be bundled up with a customised copy of a story file interpreter coded in Javascript - in effect, a program for a web browser to follow - and a suitably encoded version of the story file. The practical effect should be that anyone visiting the page with any modern browser can just play.
There are several active projects to write good in-browser interpreters. Inform ships with the "Parchment" interpreter built in, but it supports the use of any other interpreter the author wants to try (including, for instance, a later version of "Parchment" than the built-in one). If we have access to an exotic Javascript-based interpreter called, let's say, "Urbzig", then we can install it by putting it into the "Templates" subfolder of the "Materials" folder for the project, and then ask for it to be used instead of "Parchment" like so:
Release along with the "Urbzig" interpreter.
Previous | Contents | Next |