An Adventure In Small Computer Game Simulation Hat

An Adventure In Small Computer Game Simulation

Scott Adams


This paper will cover the basic philosophy and structure of the data base for the Adventure Program.

What Is Adventure?

Adventure is a copyrighted program designed to run on a small personal computer such as the Radio Shack TRS-80.

An Adventure consists of two parts: 1) the Adventure Program, and 2) the Adventure Data Base. Adventure is designed to allow the user to explore an imaginary world. The player travels from location to location while manipulating objects he finds there. In short, Adventure is a role playing simulation. The goal of an Adventure varies; for one it might be to discover treasures and another to perform a certain mission within a critical time limit.



To my wife Alexis for her patience, to Ted Heeren, my "sounding board" and chief play tester, to Paul Sharland for some good ideas, to the TRS Computer Club of Orlando for some good sessions, to Ron Austin of the Little Computer Co., for some good ideas, and to Crowther & Woods for the inspiration.

Scott Adams, Stromberg-Carlson, P.O. Box 3435, Longwood, FL 32750.

The player communicates with the program through 2 word English sentences consisting of a verb and a noun. Some examples and their possible results:

LOOK AROUND A description of current location is given; also a list of all items visible here.
TAKE INVENTORY A list of all items being carried is given.
GO NORTH The player is moved to the location that is North of the current one.
GET AXE If there is an axe in the current location, it would be given to the player.
ENTER HOLE If there was a hole and the player could fit in it, he would then enter it.

Many commands could be entered in more than one way, such as:



These might do the same thing.

A sample scenario from Adventure 1 follows: (Human inputs are underlined):

You are in a forest, visible items here are:
Obvious exits visible are NORTH, SOUTH, EAST, WEST.
Tell me what to do? CHOP TREE.
I have no axe!
Tell me what to do? YELL.
Nothing happens.
Tell me what to do? WALK NORTH.
You are in a forest. Visible items here are:
Obvious exlts visible are: NORTH, SOUTH, EAST, WEST.
Tell me what to do? CLIMB TREE.
You are in the top of an oak. To the East I see a Meadow beyond that lake.
Obvious exits visible are:
Tell me what to do? PICKUP TREE.
It's beyond my power to do that!
Tell me what to do? CLIMB DOWN.
(skipping further along)
You are on the shore of a lake. Visible items here:
Water. *Golden Fish*.
Tell me what to do? GET WATER.
I've no container!
Tell me what to do? DRINK WATER.
Boy that really hits the spot!
Tell me what to do? TAKE INVENTORY.
You are carrying: Nothing.
(A little later after going and getting a bottle.)
Tell me what to do? TAKE INVENTORY.
You are carrying: empty bottle.
Tell me what to do? SCORE.
You have stored 0 treasures.
On a scale of 0 to 100 that rates a 0!
Tell me what to do? GET WATER.
OK, tell me what to do? TAKE INVENTORY.
You are carrying: bottle of water.
and so on. In this particular adventure the object is to find 13 treasures and bring them to the designated treasure room. The average playing time to do this can range from 2 days to a month depending on the resourcefulness of the player! Along the way the player finds and confronts all sorts of puzzles and problems from how to wake a sleeping dragon to the problem of stealing honey from killer bees!

What software makes up Adventure?

For an adventure there are 3 parts:
  1. Adventure interpreter
  2. Adventure data base
  3. Adventure Editor

Adventure is so written that by changing the data base an entirely new adventure is created. The adventure editor is used to create adventure data bases which are then implemented by the adventure interpreter. The adventure editor requires a TRS80 32K single disk system to run while a created adventure can run on TRS-80 Level-II 16K cassette system. (Usually with no memory left over!) The size of an adventure though is set when initially built with the editor. It is posslble for an adventure to be written that requires a 48K system!

Adventure Data Bases

The Adventure Data Base is made up of five tables: Commands, Vocabulary, ObJects, Rooms and Messages. These 5 tables and a few control words are all that is needed to define a complete Adventure.


The vocabulary table is broken in 2 parts: Verbs and Nouns. This allows the interpreter to run slightly faster than if the vocabulary was one long array.

In the vocabulary table is found all legal words for the Adventure. Synonyms are signified by an (*) asterisk in the first position following the main word. Example: 1) GO 2) *WALK 3) * RUN 4) EAT

Here we see Walk and Run are synonyms for Go. Wherever a vocabulary word is needed in other Adventure tables only the main word is allowed, the synonyms are only for the players input.

Certain positions are reserved in the verb and noun tables for key words. Other than that they may be in any order. Following are some key words and the positions expected: VERB: 0) AUTO 1) G 10) GET 18) DROP. NOUN: 0) ANY 1) NORTH 2) SOUTH 3) EAST 4) WEST 5) UP 6) DOWN

When the Adventure interpreter runs, it will convert the two words that the player enters into two numbers representing the respective offsets in the verb and noun tables.


The rooms table contains all information for each location a player may find himself in. It is broken into two parts: Description and Directions. Room #O is a "Holding" room for objects. The player never ends up here.

The Description Table contains the description of a room which will be preceded by a "I'm in a" when it's printed out or optionally if the first character is an asterisk it will be output without this. Example: DESCRIPTION Greyroom Swamp *I'm on a Branch WHAT'S OUTPUT I'm in a Grey room I'm in a swamp I'm on a branch. The Direction Table contains one entry for each of the 6 possible directions. (see Vocabulary entries 1-6). Each entry consists of a room number Where this direction leads to or a zero if there's no exit via this direction. When the description ot the room is output, the visible (all non-zero) directions are also output. Rooms may also be entered or left without benefit of this table (by using a Command table entry) Once an entry is built into the room table, it cannot change at any time while the Adventure is being played

Example of a room:
The room shown is room #2. It prints out: I'm in a tree. Visible exits are: Down. Note that when a player says GO DOWN he will end up in room #5 automatically with no entry needed in the command table. This auto transfer feature of the interpreter works for the first directions found in the noun vocabulary which correspond to the directlon table entries.

Objects (or Items)

This table contains all information on the various objects that wlll be found by the player. This table is the only one in the Data Base that is modified as the Adventure progresses. The objects table is broken into 2 main parts: room numbers and description.

The room numbers part contains the room where the object currently is. A room number of 0 says the item is currently not anywhere. And a room number of -1 says the player is carrying the item. The room numbers are what gets modified as items are moved around in the adventure.

The description part contains the description of the item followed optionally by the take/drop control.

The take/drop control is a vocabulary enclosed in slashes (/) and signifies the vocabulary word which is used to automatically take or drop this item. This will be further explained in thc Command Table section.

Example of some objects: ROOM 0) -1 1) o 2) 5 3) 5 4) 0 DESCRIPTION Rusty Axe/ Axe/, Pencil/pen/, Large Tree, Empty Bottle, Bottle of Water.

In the above example, the axe is being carriod, and the large tree and empty bottle are in room 5. The rusty axe can be plcked up and dropped by saying GET AXE or DROP AXE. The same is true of the pencil. The bottles can only be manipulated if there are specific commands for them in the Command Table. Note that the bottle of water is in no room, possibly waiting to exchange room with the empty bottle on the player command: GET WATER (see Command Table explanation for further discussion). If the player said GET TREE and there has no entry for it in the Command Table then the message "It is beyond my power to do that" would be output automatically by the interpreter.


The message table contains all adventure messages to be output. The message numbers range from 1 to 51 and 102 to 149. Some examples: 1) Nothing Happens 2) The box exploded 3) I see no tree here 4) The dragon attacked me!


The Adventure Table contains one entry for each valid command a player may give. The table consists of two major sections: Auto Commands and Player Commands. Each command entry is broken into 3 parts: Vocabulary, Logic, Action.

The following is a typical command breakdown: The Vocabulary part consists of the verb noun which matches the players entry, such as LIGHT LAMP or CLIMB TREE if the noun is "any" then any noun is allowed. Example. A command CHOP ANY would take a players input of CHOP or CHOP TREE or CHOP HOUSE and still be valid. Once the interpreter matches the verb and noun parts of a command to the player input, the logic section is then activated.

The logic part of a command consists of from 0 to 5 conditions which must be satisfied before the action section will be executed. If there are O entries here, the command is always valid; otherwise, all the logic conditions must be met. Each logic has a secondary number associated with it depending on the logic. A short list of logics and examples follow:

1 Object (Item) is on person
4 Person is in room (Item)

1,2 says object #1 must be on person
4,20 Person must be in room 20

If any logic Item proves false the interpreter continues scanning starting with the next command in the Command table.

The Action Section consists of from 1 to 4 actions which will be performed if and only if the vocabulary matches the players entry and all logic conditions are true. Note that to printout a message its number needs only to be entered as an action. Some actions require an item or two to work on. In these cases the logic list is scanned for the next item with logic control 0.

A short list of some Actions:

64 Describe room, its contents and all visible exits.
70 Clear Crt screen
72 Swap room #'s of next 2 items in Command line.

Example of Typical Command Table

41 LOOK ANY 70 64
42 GET WATER 2,1,3,2,0,2,0,3,0,1 72,55
43 DROP WATER 12,2,2,1 12,11


1) 1 Water
2) -1 Empty Bottle
3) 0 Bottle of Water

1O) The Tree is large
11) I have no container
12) No, I can't do that

(Player commands and what happens)

LOOK TREE 1 ) Command Table is searched 2) Match on Command #40 is found 3) Action Item 10 is performed. Message #10 is output "The tree is large". 4) Auto mode entered (to be explained later)
LOOK AROUND 1 ) Command Table is searched 2) Match on Command 41 is found 3) Action 70 is performed. Screen is cleared. 4) Action 64 is performed. Room Description is output. 5) Auto mode entered (to be explained later) Assume person in room #1.
GET WATER 1) Command Table is searched. 2) Match on command #42 is found 3) Logic 2, 1 is true. There is water in current room. 4) Logic 3,2 is true. Person is carrying an empty bottle. 5) Action 72 is performed on Items 2 & 3. Empty bottle room is set to 0 and bottle of water is now being carried. 6) Action 55 is performed on Item 1. The water is removed from where it is and put into Room 0. 7) Auto mode entered.

The Object Table will now look like this:
1) 0 Water
2) 9 Empty Bottle
3) 1 Bottle of Water (water in the bottle is being carried)

(Using the new obJect table)

GET WATER 1) Command Table is searched 2) Match found on command #42 3) Logic Item 2,1 is false! Water is not in current room! 4) Command Table search continues 5) Match found on command #44 6) Logic Item 12,2 is true! Empty bottle is not in room or being carried. 7) Logic Item 2,1 is false! Water is not in current room. 8) Command Table search continues. 9) End of Command Table found 10) MSG - "I can't do that yet" is automatically output 11) Auto mode entered.

Assume following Object Table and person in room 1.
1) 1 Water
2) 4 Empty Bottle
3) 0 Bottle of Water

GET WATER 1 ) Command Table is searched 2) Match on command #42 is found 3) Logig 2,1 is true. There is water in current room (room #1). 4) Logic 3,2 is false. Empty bottle is not being carried or in room #1. 5) Command Table search continues 6) Match on command #44 is found 7) Logic 12,2 is true. Empty bottle is not in room or being carried. 8) Logic 2,1 is true. There is water in current room (room #1) 9) Action 12 is performed. Message #12 "no, I can't do that" is output. 10) Action 11 is performed . Message #11 "I've no container" is output. 11) Auto mode entered.

Mentioned earlier was the auto phase of the Command Table. The commands are built the same as in the player phase with the following differences: 1) Verb is "AUTO" 2) Noun is a number from 1 to 100 3) Unlike player phase all auto commands are scanned. In the player phase only 1 command at most is executed then player phase ends. 4) Instead of matching on players input, a match is made of a random number from 1 to 100. Therefore, a command AUTO 80 has an 80% chance of being activated during the AUTO phase. 5) The AUTO phase is always executed immediately following the player phase!

Note that by using the special flags and AUTO 100 commands any player command can be extended from the limit of only 4 actions. The AUTO commands are always found at the beginning of the Command Table and end on the first non-AUTO entry.

0) AUTO 100 8,10,1 13 14 60
1) AUTO 20 4,11 12
2) AUTO 1
3) AUTO 1
4) READ MSG 2,10,1 10 11 12 58

Example of Command Chaining usinn AUTO

1) Command Table is searched 2) MATCH is found on command #4 3) Logic 2,1 is true. OBJECT #1 is in room. 4) Action 10 is performed. Message #10 is output 5) Action 11 is performed. Message #11 is output 6) Action 12 is performed. Message #12 is output 7) Action 58 is performed. Special flag 1 is set 8) AUTO mode is entered 9) Command 0 is activated 10) Logic 8,1 Is true. Flag is now set. 11) Action 13 is performed. Message #13 is output 12) Action 14 is performed. Message #14 is output 13) Action 60 is performed. Special Flag Number 1 is reset 14) Command #1 has a 20% chance of activating. This time it does not. (Looking at command #1 we see that even if it is activated nothing will happen unless the person is in room 11 (Logic 4,11) at which time message #12 would be output.) 15) Command #2 has 1% chance of activatlng. This time it doesn't. 16) Command #3 has 1% chance of activating. This time it doesn't. 17) Command #4 Is encountered. Verb doesn't equal AUTO. AUTO phase now exists.

One other special phase can be entered. This is the AUTO drop/get phase. If the player enters a get or drop and there is no match in the Command Table for The the Objects Table is scanned to find the requested object. Example: If in the Command Table you have:

42) Get mud with logics and actions
43) Drop hay with logics and actions

and in the Objects Table you have:


Following will happen:

GET MUD if command table is true it is executed otherwise "I can't do that yet" is output. DRPP MUD - AUTO Drop is activated. Object is dropped. GET HAY - MSG "I don't understand your command" is output (i.e., hay cannot be picked up this way!) DROP HAY If Command Table is true, it is executed else message "I can't do that yet" is output. GET SEEDS - AUTO Get is activated. Item is picked up. DROP SEEDS - AUTO Drop is activated. Item is dropped.

The AUTO Drop feature basically means that an item can be picked up or dropped by the player by including "/NAME/" at end of the objects description, without having to enter a Get or Take command in the Command Table tor each item. When the AUTO Drop/Get is activated it may also output message, such as "Item is not here" or "Item is not being carried."

Control Words

The following are some control words found in an Adventure:

SPECIAL FLAGS: There are 15 special flags (0-14) which may be set or reset by Command Action. Initially all are reset.

DARK FLAG: When this flag is set, then it is dark in the Adventure and unless object #9 is in the current room or being carried then it is too dark to see. Also if players move while it is dark and goes in an invalid direction he may fall and break his neck! (Object #9 is always an artificial light source!)

LIGHT BURNING: # of turns that a light source (Object #9) may burn before going out. The light is considered to be burning if person is carrying Object #9.


The Adventure Data Base is flexible, allowing a wide variety of Adventures to be written. From magic to outer space to the old west almost any scenario can be set up *NOTE that the Adventure interpreter and Data Bases are currently available through national distributors (such as Creative Computing and Softside among others). Adventure may currently be purchased for the following computers: TRS/80, PET, CP/M. and Apple.


Adenture seems to have taken the computer world by storm. I first saw it in Toronto at the Canadian Computer Conference in 1977 running in Fortran on a prime computer. Tracking back I found it was written originally by Will Crowther and greatly expanded by Don Woods. But it goes back even further to a computerized version of Dungeons and Dragons which originated at Bolt, Beranek, and Newman, a consulting firm in Cambridge, MA. Dungeons and Dragons as a serious fantasy board game written by Gary Gygax and Dave Arneson in 1974 and published by TSR Hobbies, Inc., Lake Geneva. WI.

Copyright © Richard A. Bartle (
21st January 1999: aaiscgs.htm