The world
Home · The engine in ten minutes ·
LevelBlockRuntime
In brief
The game has sixteen levels. Each is a grid of 32 × 32 blocks, and each block has four faces holding wall references and a floor where items lie. A level is built from its files: the level's INF file names the MAZ map that gives each block its four walls, and adds monsters, scripts and the bindings between blocks and scripts. Some levels have a second sublevel record that changes their monsters, doors and walls for part of the level.
The party changes level only through scripts (stairs, pits, portals) or by starting a new game or loading a saved one. When the party leaves a level, the game keeps its changed state in a temporary file and restores it on return. Doors open and close by changing the wall references of their block. The party steps into a neighboring block only through a wall that lets it pass, and never into a block that holds a monster.
The pages of this chapter
| Page | What it covers |
|---|---|
| Blocks, directions and positions | The grid, [XX:YY] positions, directions, the faces of a block and the floor positions. |
| Changing level | When the game loads a level, the level changes of the original scripts, coming back to a level. |
| Sublevels | The levels with two sublevel records, and what carries over from one to the other. |
| Walls and doors | What a wall lets through, how a door opens and closes, faces a level does not map. |
| Interacting with walls | Wall decorations, switches and forcing a stuck door. |
| Moving the party | The step test, the events a step sends, what the party sees. |
| The levels | Each of the sixteen levels, its map and its scripts. |
How the game reads the level files is described in level data.
Doors across this site
A door is a wall face whose wall reference moves, step by step, between a closed and an open state; see walls and doors. Doors appear on several other pages:
- Rules. Forcing a stuck door; scripted doors, with the instructions open a door, close a door and toggle walls or a door; monsters and doors; drawing a door and how each kind moves; door sounds.
- Values. Wall properties, wall mapping flags and wall interaction types.
- The game's doors. Door images; the doors and locks of level 7, the lever doors of level 12 and the coin doors of level 15; every door on the level maps.
- Files. The door records and wall mappings of the INF file (field reference); the wall references of the MAZ map; the walls of a left level in its level record.
- Executable. Door and wall step, door operation wrappers, door side test, force a door, operate a door switch, wall-click dispatchers, advance door operations; door operation slots, door direction masks, door-forcing chances, wall properties and the handler cells.
Sources
Each page of this chapter ends with its own sources. The level connections come from the decoded scripts of the 16 INF files; see changing level.