Riven engine overview
A Riven scenario is made of virtual objects called stacks and each stack is a list of virtual objects called cards. This may remember HyperCard: it's the same approach. Each card has an associated script, a sequence of commands to be executed in response of events happening to the card (for example, card creation). The player interacts with the game by means of invisible buttons, placed within cards and called hotspots. Hotspots have associated scripts too, responding to events different than cards (for example, mouse clicks). Within cards can also be placed bitmaps and movies. Finally, sounds can be played.
Riven stacks are named
- aspit (main menu, books, setup screens)
- bspit (boiler island)
- gspit (garden island)
- jspit (jungle island)
- ospit (Gehn's office)
- pspit (prison island)
- rspit (rebel age)
- tspit (temple island).
Physically, a stack is described by a set of data blocks called resources. Resources are identified by a 4-char type and an integer ID. Optionally they can also have a name, but it seems completely ignored by the engine. The resource type tells what kind of data is stored in the resource; see the resource type list for types used in Riven.
Resources belonging to a certain stack are archived inside an arbitrary number of Mohawk files. The file "riven.cfg" tells which files compose each stack by associating stack and file names.
Saved games are Mohawk archives too, and they contain additional resource types as described in the resource type list.