ALAN 2

ALAN is an interactive fiction system written by "Göran Forslund" and "Thomas Nilsson" first released in 1985, apparently with a connection to a company named "SoftLab". Although version 2, released ca. 1993 and superseded by ALAN 3 in 2005, has some internal format inconsistencies, they are similar enough that they can be categorized as a single format (See ); however, ALAN 3 is entirely different and is treated here and elsewhere as a separate interactive fiction system.

As with most interactive fiction formats, ALAN 2 uses a compiler (a program named only "alan") to convert "source" files to portable "compiled" versions, which can then be run with an interpreter ("arun").

Extensions
Source files use the extension .alan, although this is very frequently shortened to .ala, presumably due to DOS naming restrictions. Libraries (which are bundled with the normal files during compilation, and therefore have no compiled counterpart) also appeared to have sometimes used the extension .i. . The compiled format is a multi-file format, putting the instructions into a file with the extension .acd and the textual strings into a file with the extension .dat.

Incompatibilities in Compiled Versions
Compatibility of compiled files seems to have been broken upon almost each release of a minor version, to the point that it would produce too much clutter to have individual pages for formats 2.4, 2.5, 2.6, 2.7, etc. All interpreted versions use the same set of extensions. See for details of versions and interpreter compatibility.

Identification
.alan files will probably contain the following strings: "VERB", "END VERB", "SYNTAX", "ACTOR, and "END ACTOR", in ASCII.

.acd files each start with their version, with one level per byte; version 2.6.1 starts with 0x02 0x06 0x01. All surveyed examples have the last byte set to 0x01, and it may be possible that this is always 0x01 due to changes in the last version not breaking compatibility. If this is true, it may be that (as has been observed) all ALAN 2 .acd files start with 0x02 [A single varying byte] 0x01 0x00 0x00 0x00 (although it is unclear what the 0x00s are for, or if they are necessarily included).

Specifications

 * , containing grammar.html (a formal documentation of the syntax in Backus-Naur form) and language.html (containing a detailed but informal explanation of all the parts of the language) for version 2.8. This is also available in PDF form at.
 * Page 114 of, documenting differences between versions and interpreter compatibility

Software

 * Versions 2.7 and 2.8, both compilers and interpreters, in the IF Archive
 * Version 2.5 and 2.6 interpreters only, in the IF Archive
 * The source of the 2.8.6 compiler and interpreter, in the IF Archive
 * The source code of ALAN 2 and 3, starting from 1993
 * Gargoyle, although it failed when tested

Sample Files

 * Source files in the IF Archive
 * A mix of ALAN 2 and 3 games in the IF Archive
 * Official examples

Links

 * ALAN 2 at the Interactive Fiction wiki
 * the ALAN 2 FAQ
 * A later version of the ALAN website, also covering version 3