Crowther's 1976 Adventure ported to I7, with source

I’ve finally finished my work on converting Crowther’s original 1976 version of Colossal Cave, pre-Woods, to Inform 7. The source is available here:

ifarchive.org/indexes/if-archive … nform.html

and the compiled z-machine file is available here:

ifarchive.org/indexes/if-archive … zcode.html

which means the game is playable online here:

iplayif.com/?story=http%3A%2F%2F … rowther.z5

I took a few liberties with the formatting, in a kind of compromise between the all caps and line spacings of the original and the standard modern IF presentation; bold names before every description seemed too out of place given the text printing behavior of Crowther’s. And in fact, I think the way that Parchment renders bold text makes my experimental approach surprisingly striking in this online version.

More details about my design decisions and implementation are available in the original thread about my port. I should emphasize that, being the first of the genre, it may be more accurate to name this an experimental work rather than a game; there is no way to win and no points, so collecting treasure does nothing; the dwarves behave very differently from Wood’s implementation; and the map connections sometime feel inconsistent.

I also took the liberty of correcting a few bugs found in the executable form of the game; whether they existed in the original, or were introduced by conversion from the PDP-10 version of FORTRAN to a form that could be compiled to an MS-DOS compatible executable, the code intended to be executed was fully extant in the original FORTRAN source. They involve going down the steps while carrying the nugget of gold, and going south from bedquilt, both of which crash the compiled executable.

I hope the source code is useful to people interested in learning Inform 7, and that others can enjoy playing through this z-machine version and comparing its behavior to that of the famous Crowther-Woods version.

I haven’t looked at the source, but thanks for doing this.

This is very nice indeed :stuck_out_tongue:

Bumping because David has let me know that the newest versions of these files are now available on the archive. The changes don’t seem to have propagated to all of the mirrors yet, but the links to ifarchive.org proper in my first post still seem to work.

Changes mainly include some bug fixes and oversight corrections, largely thanks to a few testers of mine in the real world. Let me know if anyone finds any other problems!

Is this intended to be playable? I’ve tried playing it and have run into a number of untenable situations. Twopit Room, for example, is unnavigable. There seems no way to go down into the pits. Another room (can’t remember which) description lists exits of N SE and E (or S?) which don’t seem to actually exist.

It’s intended, from what I understand, to be as close as possible to the earliest known version of Adventure, done before Woods came along. And from what I’ve read, it succeeds - this really is an unfinished work, playable only as far down as two levels, give or take.

For more on Crowther’s (pre-Don Woods) version of Adventure, see Jimmy Maher.

Here’s the latest source, adapted and made adaptive for 6L02. I’d like to have some people look over it before I submit to the archive, but I believe I have all the bugs worked out from converting it to the new version of Inform. So if you’re interested, please let me know how it goes, or paste a transcript!

Changelog:

In release 3.14, I have: - further cleaned up the code; - added a [/b] shortcut for ending the boldfacing in the room long descriptions; - written more comments and better heading names; - normalized the tables to line up under the new elastic tabs option; - added syntax to support naturalistic truth value names, thanks to Ron Newcomb; - folded in only the relevant bits of Emily Short's Locksmith extension, to reduce memory footprint; - and adjusted for Inform build 6L02, including: - made all in-world text adaptive, and - added a "change the style" command to adopt a random tense and viewpoint.

Also, I added a new style command, just for fun:

[spoiler]Adventure
Colossal Cave by William Crowther, ported by Chris Conley
Release 3 / Serial number 140527 / Inform 7 build 6L02 (I6/v6.33 lib 6/12N) SD

Welcome to Adventure!! Would you like instructions?

n

(Type ABOUT for details about this specific Inform 7 implementation.)

You are standing at the end of a road before a small brick building. Around you is a forest. A small stream flows out of the building and down a gully.

>change the style
OK, I will now speak in first person plural, past tense.

>l
Sorry, but I am not allowed to give more detail. I will repeat the long description of our location.

We were standing at the end of a road before a small brick building. Around us was a forest. A small stream flowed out of the building and down a gully.

>e
We were inside a building
, a well house for a large spring.

There were some keys on the ground there.

There was a shiny brass lantern nearby.

There was food there.

There was a bottle of water there.

>get all
keys: OK.
lamp: OK.
food: OK.
bottle of water: OK.

>change the style
OK, I will now speak in third person plural, past tense.

>xyzzy
It was pitch black. If they proceeded they were likely to fall into a pit.

>light
(the lamp)
Their lamp was then on.

>l
Sorry, but I am not allowed to give more detail. I will repeat the long description of their location.

They were in a debris room, filled with stuff washed in from the surface. A low wide passage with cobbles became plugged with mud and debris here, but an awkward canyon led upward and west.

A note on the wall said ‘Magic word XYZZY’.

A three foot black rod with a rusty star on an end lied nearby.

>w
They were in an awkward sloping east/west canyon.

>w
They were in a splendid chamber
thirty feet high. The walls were frozen rivers of orange stone. An awkward canyon and a good passage exited from east and west sides of the chamber.

A cheerful little bird was sitting there singing.

>change the style
OK, I will now speak in second person plural, future tense.

>get bird
You will be able to catch the bird, but you will not be able to carry it.

>e
You will be in an awkward sloping east/west canyon.

>e
You will be in a debris room,
filled with stuff washed in from the surface. A low wide passage with cobbles will become plugged with mud and debris here, but an awkward canyon will lead upward and west.

A note on the wall will say ‘Magic word XYZZY’.

A three foot black rod with a rusty star on an end will lie nearby.

>e
You will be crawling over cobbles
in a low passage. There will be a dim light at the east end of the passage.

There will be a small wicker cage discarded nearby.

>get
(the small wicker cage)
OK.

>w
You’ll be in Debris Room.

A three foot black rod with a rusty star on an end will lie nearby.

>w
You will be in an awkward sloping east/west canyon.

>w
You’ll be in Bird Chamber.

A cheerful little bird will be sitting there singing.

>get
(the little bird)
OK.

>w
At your feet will be a small pit
breathing traces of white mist. An east passage will end here except for a small crack leading on.

Rough stone steps will lead down into the pit.

>w
The crack will be far too small for you to follow.

You’ll be at Top of Small Pit.

Rough stone steps will lead down into the pit.

>d
You will be at one end of a vast hall
stretching forward out of sight to the west. There will be openings to either side. Nearby, a wide stone staircase will lead downward. The hall will be filled with wisps of white mist swaying to and fro almost as if alive. A cold wind will blow up the staircase. There will be a passage at the top of a dome behind you.

Rough stone steps will lead up the dome.

>d
You will be in the Hall of the Mountain King
, with passages off in all directions.

A huge green fierce snake will bar the way!

>drop bird
The little bird will attack the green snake, and in an astounding flurry will drive the snake away.

[/spoiler]
Advent 314.z8 (504 KB)

Don’t know if this is your problem or a 6L02 bug, but the past tense of “lie” should be “lay.”

Right, the conjugations are not my own.

Hrrrmph, it looks like you should be able to hand-roll your tenses, but the game then picks the wrong one:

[code]Lab is a room. A rock is in the lab. “[A rock] [lie] on the floor. What [are] that doing in a lab?”

To lie (he lies, they lie, he lay, it is lain, he is lying, he had lain) is a verb.

When play begins:
now the story tense is past tense.

Carry out waiting:
now the story tense is the grammatical tense after the story tense.

Test me with “z/l/z/l/z/l/z/l/z/l/z/l/z/l”.[/code]

Output:

I don’t see why in the past tense it picks the pluperfect from the hand-defined conjugation. Anyway since §13.9 of Writing with Inform vaunts that the built-in verb comprehension understands irregular verbs as well it really ought to catch “lie/lay.” (The auxiliary-verb forms of “be” are messed up too but that’s another issue that authors will need to deal with using hand-rolled substitutions, presumably, so [are “that”] can be translated to “has that been,” “will that be,” etc.)

Submitted three bug reports for the misbehavior of the hand-conjugated verbs in past tense, for the lack of documentation of the old way of conjugating verbs, and for the failure to conjugate “lie” correctly. In that last one I also grumble that apparently we still have to include passive forms even though we can have intransitive verbs now.

Hoping that this won’t lead the team to tell me that hand conjugations are undocumented now and take them away.

Thanks! I noticed some of those just as you did, but I think you were more methodical in documenting than I might have been.

I wouldn’t really worry about their taking hand-conjugations away. A) 6L02 (and 6G06, for that matter) will always exist; B) eventually the answer may be “Preform is really what should be used for that”, but C) we’re not at that point yet anyway.

Version 4.3 of the source and z-machine file are now available on the Archive. Which means it’s playable online here.

Version 4.3 changes:

  • fixed the ‘optional have’ printed phrase and adaptive text regarding dwarves and the axe;
  • adaptified the jewelry’s initial appearance text and other instances of the word “here”;
  • corrected ‘a food’ when taking inventory;
  • corrected Y2, darkness, and Window on Pit descriptions to match the original text;
  • corrected initial appearance of the lamp (lantern);
  • corrected missing maze dead end cardinal exits (wow!)
  • added chapter headings in Part IV - The Parser