A-code documentation

Though A-code is not by any stretch of imagination (and despite its virtues) a popular IF language, you never know – the built-in browser mode, plus the ability to create pure HTML/Javascript versions might attract a brave soul or two. Hence this page.

Not included are a few things, which as a putative user you are expected to provide on your own:

  • A text editor of your choice
  • An ANSI C compiler
  • And if you wish to try your hand in creating new games: a dash of creative imagination.

A-code sources
Complete A-code sources are supplied as a single tarball (mipmip.org/acode/acode-12.76.tgz). Please see the tarball description document for information on its contents.

Firstly, let's deal with building runnable games from A-code source files and the ways of running such games, once built.

A-code build modes explained
Acode games can be built in five distinct modes: console, browser, single-turn (for running in a cloud in a CGI, PHP or similar wrapper), HTML/JavaScript and library test. This document explains what all these modes are and what they are for.

Using the advmake script to build A-code games
Since this file is a part of my A-code framework bundle, you clearly have the advmake script installed. This document explains how to use the script to build A-code games in various modes, so you don't have to bother with the "how" of it.

Running A-code games
The A-code kernel understands a number of command line options, though some of these need active support from the A-code source. E.g. adv550 does not understand the name of a game save-file to restore being supplied on the command line, and may land the player in limbo, with no source of light.

If you cannot or do not wish to use the advmake script for building games, here are a couple of document explaining how to do it in a more "manual" manner.

Translating A-code source into compilable C code
To build an A-code game from its A-code sources (files suffixed with .acd), you first have to use the acdc translator to create derived C sources. This document explains how.

Creating an executable from derived C sources
Once you have created (or downloaded) derived C sources of an A-code game, you are ready to create various modes of executables. This document explains how. (See a separate document for an explanation of build modes.)

Now for the A-code language itself.

A-code 12 guide Explains the concepts of the language and provides a reference guide to its components.

A-code parser
This document describes A-code parser, which has some numunusual features.

A-code texts
This document explains the details of A-code texts in all their unique glory. A minimal understanding of the A-code language is helpful but not essential.

A-code vocabulary
This document explains the unique aspects of A-code vocabulary handling.

The next group of documents discusses some aspects of the language in a greater depth.

The UNDO and REDO directives
The A-code UNDO and REDO directives explained.

The library mode interface
In the ADVLIB mode, the A-code kernel presents itself as a function called advturn. This document describes its functionality and calling sequence.

The CONTEXT mechanism
If an A-code game is to run in a cloud, which is very useful for beta-testing, it must not use the the QUERY directive. This document explains how the CONTEXT variable can be used to avoid use of QUERY. (The no-QUERY restriction may be removed in a future version of A-code, in which case this page will become obsolete.)

Upward compatibility of saved games
A-code is unusual in that with a little care a game author can ensure that saved games are upward compatible and can be loaded by later game versions. This document explains how.

Finally, some history... A-code history

Back to the A-code page
To the Mipmip home page
Feel free to leave a comment!
Mike Arnautov (20 February 2019)