Original Adventures code

Anybody interested in the archeology of the code of Crowther’s original Adventures? Or does anybody know about any other interest?

By archeology I mean stripping out the various older versions that can still be detected in what has come down to us. For example, what is room 26?

This is the definitive article:

Somewhere Nearby is Colossal Cave: Examining Will Crowther’s Original “Adventure” in Code and in Kentucky
Dennis Jerz
digitalhumanities.org/dhq/vo … 00009.html

I am aware of Jerz’s article. I want to go deeper into the questions of how Crowther’s original was developed. For example, Crowther calls the program “Adventures” with a final ‘s’ that did not survive. I realize that not many people are going to be happy reading code in a language without block structure or “else” statements but once past the shock it is not too hard. I, of course, have no plans to actually compile and execute the code. Not only did Crowther simply stop in the middle of development the tape he sent Woods has errors. This is strictly a project in reading code. And pondering questions like the one about why one dwarf throws an axe and other dwarves throw knives.

I’d found it interessting to read about your findings …


The best resource I know of for this sort of archaeology would be Arthur O’Dwyer’s ports. He’s brought together at least 11 different historical versions of the game, and converted a good amount of the code to ANSI C (which does help the legibility quite a bit, though Crowther’s original remains in Fortran only).

This is all a work in progress. I might change directions at any moment. But here is a report about can be done:

The messages the program sends are part 6 of the data base file (advdat31). There are 80 messages numbered sequentially. The first 48 messages occur sequentially in the code. It is as though the code was written with the messages embedded and then the messages were extracted to form the data base. Thus a version of the code that supported the first 51 messages. This version includes the dwarves, the bird, the snake, the rod, the grate, the lamp and “plugh”. Message 41 is no longer used. Verbs through “attack” are recognized. Message 49-51 are quips - replies to commands that the game play wants to ignore but are well integrated with the prior 48.

Message 52 and 53 are definitely out of place - they belong with the earlier dwarf logic. Finally messages 71-78 cover the last four verbs - eat, drink,rub and pour.

How many of the locations I should assign to the earlier version of the code is difficult to determine. I am startled that the dwarves must be included in the earlier version - call it version A - because they seem somewhat tacked onto the game. There is good evidence for a version with fewer locations - but that is another story.

The compass directions are not the original way to specify movement. In the list of movement commands east, west, north, and south are 43, 44, 45 and 46. We can try to recover the pre-compass game. If we remove all movements with numbers over 42 we get a plausible game including all the first 38 rooms except rooms 33-35.

The first phase within the cave ends with player block at two points - the fissure and the snake. In the pre-compass game solving either of these puzzles leads the player to treasures. The fissure path stops at its treasure but the snake path goes on to the pit with a window. This seems to be a plausible - if incomplete - game.

But we must note that rooms 33-35 are not in the game. The only way to get to significant room 33 (the Y2 room) is to go north from 28 (the room just beyond the snake). I would assume,
tentatively that there was once a non-compass command to make that move but it is now lost.

When I say the first 38 rooms I do not mean there are 38 actual rooms in the game. Ten of the rooms are forced motion rooms and room 26 is completely missing. Hence there are really 27 rooms (24 without rooms 33-35).

Forced movement is a way to use room description text as a message accompanying a move. It seems as though it must have been an early feature but it was used for the very last room (number 79) in the existing game.