Colossal Cave in Dialog

It seems to be a rite of passage for each new parser authoring system to be used to implement the original 350-point Colossal Cave. I’m curious, has anyone done this for Dialog yet?

If not, I’ve been looking for a way to practice my Dialog skills, so I might give it a shot.

12 Likes

#get #lamp

3 Likes

I’m always down for another port of Adventure. (Really!) I’d like to see this, especially if you release the code.

1 Like

Sounds great; looking forward to seeing it. Where is the best place to go for technical documentation on the 350 pt Colossal Cave Adventure?

Woods’ Fortran code is actually meticulously commented, such that I found it fairly clear without prior familiarity with Fortran. Donald Knuth’s later literate programming version in CWEB uses much of Woods’ commentary verbatim.

1 Like

Great! And where would I find that?

https://ifarchive.org/indexes/if-archive/games/source/

advent-original.tar.gz is the one you want, I think.

EDIT: And to actually play the PDP-10 Fortran version without having to compile it yourself, there’s a nice package put together by Jimmy Maher using the SIMH emulator.

https://www.filfre.net/2011/05/tops-10-in-a-box/

3 Likes

Is this a thing which is happening? If so, is there a public repo where we can watch?

It probably will be, at this point; I’ve spent the last few weeks training for a new job and classes are about to start up again, but once my life settles down a little I do want to sink my teeth into Dialog, and Adventure was my first introduction to IF so I’ll always have a soft spot for it.

4 Likes

For anyone who wants to follow along, I’ve created a repository.

Also, a question for the community. Should movement by keywords (“hill” instead of “west”, for example) be subject to normal movement restrictions, like the randomness in Bedquilt and Witt’s End? Or should it effectively teleport you (like the Inform implementation does)?

4 Likes

From the “this is a system demo” standpoint it seems like the former is more valuable.

1 Like

Ideally, in my opinion, it should follow the original, which allows the player to cut through the randomness with location keywords in some places (SLAB from Bedquilt always leads to the Slab Room; SECRET in Hall of the Mountain King always slips past the snake into the Secret Canyon) but not others. (FOREST, from You are in open forest with a deep valley to one side, has a 50% chance of taking you to You are in open forest near, both a valley and a road and a 50% chance of leaving you in the same place. Witt’s End, meanwhile, doesn’t allow keywords at all.) But being that scrupulous about it (the Inform version is not) would require you to spend many exciting evenings squinting at the numerical travel table in the FORTRAN data file.

3 Likes

My current thought, based on “how would I build this puzzle today?”, is to allow keyword movement to teleport to adjacent visited rooms and adjacent aboveground rooms. In a few specific places (Witt’s End and the Forest, any others?) it instead redirects to normal compass movement, with all the randomized annoyance that entails.

This makes things like Bedquilt → Slab work the same way as Y2 → Plover (i.e. you can teleport as long as you’ve visited your destination), which has a certain elegance to it. And it also allows people to “go hill” or “go building” from At End Of Road, which seems like the author’s intent (since no compass directions are provided in the descriptions).

3 Likes

I know this is what Graham Nelson did, but I’m not sure I see the reason to enable travel by keyword only after the rooms have been visited. A first-time player would have no real way to “cheat” using travel keywords because they wouldn’t know the names of unvisited rooms, or XYZZY and PLOVER, etc., in the first place. On the other hand, for someone who has either already played, or doesn’t care about “playing” as such and only wants to explore the game world, the faster navigation allowed by the travel keywords might be a welcome convenience.

3 Likes

A fair point, and honestly I agree. I’ll change that.

3 Likes

This is my take. The zip file contains the dialog source, a walkthrough, and a transript.

Adventure.zip (40.2 KB) Adventure.z5 (175.2 KB)

7 Likes

(general round of applause, just mentioning a couple of typos that jump out)

At Slit, but can’t fit the slot?

You don't fit through a two-inch slot.

Also a missing close-quote on line 3416,

(descr *)
	The message reads, "This is not the maze where the pirate leaves
	his treasure chest.
2 Likes

Quick C64 benchmarks (stock ROMs, 1541, no REU)
Dialog .aastory w/aambundle 0.5.1 with ifste advent vs. Ozmoo v4 ZILF 0.9 advent.z3

Using first ten moves from the Dialog edition’s walkthrough:

e
take lamp
take keys
w
s
s
s
d *
w
take cage

Dialog:

Startup to prompt: 39 seconds
First ten moves: 80 seconds

Ozmoo/ZILF:

Startup to prompt: 106 seconds
First twelve* moves: 51 seconds

* - The implementations are not identical. ZILF implementation prompts us for instructions, which Dialog does not, and this slight detour to answer “N” was counted as part of the “startup.” Also, ZILF does not support the auto-unlock and auto-open of the grate as Dialog version does, so UNLOCK GRATE and OPEN GRATE were added and the play was 12 moves compared to Dialog’s 10, so that both plays ended at picking up the wicker cage. Also, ZILF implementation does not display the “You walk south.”-style travel messages shown by Dialog.

Obviously we really feel the lack of any fastloading assistance in the Ozmoo build, resulting in a much longer startup time. (But another way to frame this would be to attempt to play on a sd2iec-class device. Ozmoo would perform fine-to-good and Dialog wouldn’t load at all.) Dialog gameplay performance wasn’t bad, although it is sometimes noticeable that words are being chunked out one-at-a-time from disk.

4 Likes

Very nice! I’m going to avoid looking at your source until I finish mine (to avoid accidental plagiarism), but I’m curious how you handled the dwarves—do you only allow one dwarf to appear at a time, like in Nelson’s version, or do they move independently?

2 Likes

Thanks @jcompton for the typo reports. There are a couple of minor, non game breaking things to fix, I’ve messed up the endgame rooms darkness flag for example, but you have the lamp so that’s not too much of an issue.

@Draconis I have no experience of the original so my port is whatever GN has done I have done - mostly.

1 Like