Adventure Language
The Adventure Language (Al) is used to describe adventure games that can be played
with the ADePT engine. Different language versions are described in the files
named game???.adg. The current version is 003.
The main concepts of Al are derived from the concepts of the
game interface. There are scenes consisting of regions that have
shapes and images. Mouse clicks in scenes cause actions depending on the current tool. The
inventory contains objects that may be added, removed, or used by tools. Dialogs consist of
the text of speech and answers. The actions display text, manipulate the game, and provide
basic timing and mathematics.
Item types
Game
Tools and Actions
- Tool <name> {description | cursor | action | move | object}
- Action <name> {tool | action | object}
Scenes
- Scene <name> {description | image | init | exit | regions | background | size | offset | boundary | frontScale | backScale | perspective}
- Region <name> {description | position | shape | image | actions | init | exit | press | release | in | out | distance | boundary | goto}
- Character <name> {description | position | angle | orientation | imageStand | imageWalk | boundary | time | distance | mouse | actions | init | exit | start | stop}
Shapes
Images
- Image <name> {file | position | size}
- Transparent <name> {file | position | size | transparent | mask}
- Animation <name> {position | size | images | offsets | sounds | timing | repeat | end}
- Text <name> {text | position | size | style | font | mouse | resolveVar}
- Style <name> {align | transparent | text3d | raised | shadow | colorLight | colorDark | colorBack | gap3d}
- Font <name> {name | size | bold | italic}
Inventory and Objects
- Object <name> {description | image | actions | cursor}
- Inventory <name> {object | add | select | insertAfter | backwards | update}
Dialogs
- Dialog <name> {description | image | init | exit | text | name | player | background | textArea | style | textAlign | answerAlign | font}
- DialogText <name> {text | answer | topic | textSpeech | answerSpeech | textImage | answerImage | action | remove | diary | resolveVar}
Textual Information
Modification of Items
Control Flow
- Sequence <name> {actions | loop | single | random}
- Case <name> {conditions | actions | negation}
- Condition <name> {conditions | true | false | or | loop | negation}
- SetCondition <name> {condition | true}
- SetVariable <name> {variable | item}
Interface Commands
- Command <> {command | numberParam | stringParam}
Motion along a Path
- Motion <> {region | path | type | stretch | timing | repeat | end}
- Route <> {route}
- Path <> {points}
- RandomPath <> {shape}
- Line <> {steps | start | end}
- Spiral <> {steps | center | startRadius | endRadius | startDegree | endDegree | stretch | rotate}
- Wave <> {steps | start | length | startAmplitude | endAmplitude | absolute | waveLength | waveStart | degree}
Animation Timing
Real Time Control
- Timer <name> {action | time | repeat}
- PlayAudio <name> {audio | repeat | sync | end}
- PlayVideo <name> {video | repeat | sync | end | position | size | stretch}
Input
Mathematics
- Calculation <name> {result | operator | value1 | value2 | flag}
- Comparison <name> {comparison | value1 | value2}
Documentation scheme
All item types are described by the same scheme. It consists of two tables, one for the generic description
and one for the defined attribute keys.
| Item type | The item type. This starts the declaration of an instance of this item type. |
| Description | This describes the item in general. |
| Action | This describes how the item is used as an action. (Only if it has type Actions.) |
| Condition | This describes how the item is used as a condition. (Only if it has type Conds.) |
| Key | Type | Default | Description |
| name | type | default value | short description |