I have ported Advent 430 also known as Adventure 2.5 by Woods/Crowther into Dialog. Woods’s original code is in Fortran and machine translated C. I couldn’t bring myself to unravel hundreds of goto jumps to figure that code out, luckily Open-Adventure by Eric S. Raymond exists. It is a forward port of Adventure 2.5 into a more traditional, structured C program, much easier to work with.
Open Adventure has quite a faithful reproduction of the original’s gameplay. Most notable differences from the original are the i/inventory
, l/look
, z/nothing
synonyms and seed
and waste
debug commands. Also the dragon question’s answer is mandatory in OA, which kinda gives away the puzzle. Therefore I changed it back into a silent implicit action like in Woods version.
This port has some other differences in behaviour and responses wrt OA:
grate
won’t try to go from the grate room into the below grate, I believe this
is concidental in OA and I have chosen to follow Woods’s behaviour. Here it will sayWhat do you want to do with the grate?
pour bottle
while the bottle is empty will respond withBottle what?
in OA and Woods version, this seems to be a bug. Here it will sayPour what?
- When the game closing message is shown, the troll is destroyed, but it comes back if the player tries to cross the bridge a second time (OA has this, I am not sure about Woods version). Here it is gone for good.
say
command works in weird ways if used implicitly, I haven’t tried to cover every combination of inputs in this case. OA and Woods differ here too, and their responses are too randomly weird to be called a feature in my opinion.waste
debug command can be used with negative numbers to actually add to lamp battery life in OA, I didn’t implement this behaviour. Also in this port waste command’s parameter is limited by Dialog’s numbers(14 bits unsigned), unlike theseed
command (which accepts both big numbers and negatives, and behaves the same way as in OA).save
doesn’t close the game here. Saving penalties to the score still apply, but in a moment of weakness I have added asave mercy
command to turn them off for the playthrough.restart
andundo
works with this program. Restart is a synonym forresume
in the original and OA versions, here it restarts the game proper.about
command was added.
I am sure there many other discrepancies, but those are the ones I know of and remember at this time.
In this port same seed numbers for the RNG should lead to same gameplay as in OA. For example the perfect score walkthroughs by Ryan Sarson should work with this port.
This is not a modernization attempt, but building a game that follows the original (well, the OA version of it) as close as possible. @ifste has an excellent port of Advent 350 here, that modernizes the original Colossal Cave and showcases some nice features of Dialog’s library (like links). My purpose here was to demonstrate what the language itself is capable of and add to the available source codes in the wild, for people who may desire to peruse it.
The z-code file was built with Compiler 0m/03-Library 0.46. If you want to build it yourself, please note that you have to increase heap memory sizes when compiling for z-code (random number generator uses heavy recursion with some hefty lists carried up and down the recursion). I would not advise trying to play this on a retro machine, at some turns a trace log in the debugger can be as long as 1000 pages(about 50 lines long each).
dialogc -t z5 -H 6500 -A 2000 advent430.dg stdlib.dg
advent430.dg.zip (55.1 KB)
advent430.z5.zip (100.7 KB)
Any kind of feedback or questions are welcome.