The Å-machine is a virtual machine for delivering interactive stories. It is designed for stories implemented in the Dialog programming language.

As the name suggests, the Å-machine is inspired by the Z-machine. The letter Å (pronounced [ɔː], like the English word “awe”) follows Z in the Swedish alphabet. In international contexts, å can be transcribed into aa, as in “The Aa-machine”.

The Dialog compiler can produce Å-machine story files starting with version 0g/01. The filename ending is .aastory. Support for the widely used and historically important Z-machine remains, and will not go away. But stories compiled for the Å-machine look better on the web, and are smaller and potentially faster on vintage hardware (the latter claim is unsubstantiated at the moment, but it has been an important design principle).

In a sense, the Å-machine is to Dialog what Glulx is to Inform 7. It eliminates the tight restrictions on story size, and extends the basic functionality with a carefully balanced set of new features. But the Å-machine is designed to run the same stories on everything from 8-bit systems to modern web browsers. Data structures and encodings are economical, and the overall word size has not increased. Large stories are supported, but small stories still have a very compact binary representation.

Compared to the Z-machine and Glulx, the Å-machine operates at a higher level of abstraction. This improves performance on vintage hardware, both by making story files smaller, which improves loading times, and by allowing larger chunks of computation to be implemented as native machine code. The downside is that the virtual machine is more tightly coupled to the idiosyncracies of a particular high-level language, in this case Dialog.

Currently, only a single Å-machine interpreter exists. It is implemented in pure javascript, and must be combined with a frontend that handles all input and output. Two frontends are provided: A web frontend based on jquery, for publishing stories online, and a Node.js frontend for running automated tests. A tool, aambundle, can convert an .aastory file into a web-friendly directory structure, including story and interpreter, ready for deployment on a server.

Release 3 of Tethered runs on the Å-machine.

This Cloak of Darkness implementation illustrates how to enhance touchscreen play with clickable links.

Browser compatibility is hard, and this first release already comes with a couple of known problems. Safari on iOS doesn’t adjust the window size when the on-screen keyboard appears, so for now only half the screen real estate gets used. Internet Explorer cannot save the game state or a transcript. Chromium on mobile devices somehow picks a slightly different font size for the paragraph that contains the input field. And I haven’t been able to get any screen readers to work.

I hope to address all of these issues eventually. Suggestions are welcome!