Thursday 1 January 2015

Retrochallenge 2015/01: Will Crowther's "Adventure" Ported to 8-Bit Basic

For Retrochallenge 2015 I ported to Microsoft Micro Color Basic Will Crowther's original Fortran source code for what became "Colossal Cave" or "Adventure." The new basic source code should be easily shifted to other Basics. I have fixed and finished certain uncompleted elements in the code and changed a few things to create a few additional challenges to provide a more complete game experience of what was obviously an uncompleted "work in progress."

I re-coded the program into Basic from the Fortran source code and data file that Crowther's wrote for the PDP-10, which was recovered a few years back from old backup tapes. This is not the classic "350 point" version created by Don Woods by the addition of many novel elements to Crowther's original source. My version contains only the numeric room movement info and the room and event text descriptions of Crowther's original game, reputedly written to entertain his children in the wake of a marriage breakup in the mid 70s.

I had to wedge it into 20K of my favourite 8-bit the TRS-80 MC-10, so some of the descriptions got “edited” a little, but I was able to transfer the map info from the data file into Basic DATA statements, so it's a fairly accurate rendition of the original map. I only made a very few tweaks where directions were quite clearly messed up or to eliminate a few NE, NW, SE and SW (diagonal) directions. In reconstructing the game play elements I was greatly helped by Renga in Blue's "Observations about Crowther's original Adventure".

Will Crowther 2012

I have also added a few new commands. The SCORE command will tell you how you're doing and if you have won. The HELP command will provide some rudimentary aid. The UNLOAD command will perform the same function as the more standard "drop all" command of other adventures. The QUIT command not only quits but prompts whether you would like to save the progress you have made. You are also prompted each time the program is run if you wish to load a previous game. The same file name "COLOSDAT" is used for each save, but in the TRS-80 MC-10 emulator (VMC10.exe) you can save the resulting virtual cassette file to any file name you like in order to differentiate between different saves. Just remember that when loading and prompted to "Press Play" you must select the file name containing the desired virtual "COLOSDAT" cassette file.

See: http://faculty.cbu.ca/jgerrie/Home/VMC10_073D.zip for the Virtual MC-10 emulator, which includes the game in the JimG sub-directory of the cassette directory. To play the game load the file "COLOSSAL.C10" after typing CLOAD and hitting <Enter> in the emulator. Virtual cassette files can be loaded via the File menu of the emulator. Then just type RUN <Enter>

I was also greatly aided by Neil Morrison of the TRS80MC10Club group on Yahoo. Neil uploaded a PDF to the group of a simple text adventure program "Tower of Mystery" used as an example in a Compute's Guide to Text Adventures (1984). Here's a description of the program from that book, which fittingly contains a story reference to the original Adventure:

Tower of Mystery is a BASIC program designed to illustrate some of the concepts of adventure programming and to serve as a starting point for writing your own adventure programs. The object is to enter an old factory building where the world's only remaining copy of Adventure is reputed to be stored, and to leave with a tape containing a copy of the program.
I was able to modify this very useful program to do most of the work of text entry and analysis. I just had to modify its verb list and items and re-code the sections for each of these commands to handle the event and room descriptions of Crowther's program. I also had to add routines to handle the ongoing interaction of the dwarves, who show up periodically, and item and resource management of food, water and light, which were lacking from the Tower of Mystery. As mentioned above, I had to largely "normalize" NE, NW, SE and SW directions, since there were so few of them and it would have required too much modification of the Tower of Mystery text adventure engine's basic N, S, E and W direction handling. Using Renga in Blue's descriptions of the puzzles and other game challenges, and by examining Crowther's original source, I was able to recreate what I believe is an essentially accurate presentation of all the original game elements.

As I worked on the rooms in the Bedquilt (“Under Construction”) area of Crowther's original code I really could sense where his patience with the project petered out (sometime in 1975 or 1976) so I also ended up adding a few unique elements of my own to “complete” an unfinished work just begging for completion. I can understand what tempted Don Woods to make his additions in 1977 to create the classic 350 point version.

That being said, I did not like some of the more surreal fantasy elements that Woods added. Crowther's original version has a more austere set of locations, but they have a feel of realism that is absent from the classic version's chaotic hurly-burly of branches. Also, there is clearly a sense that Crowther's fantasy elements (Hall of the Mountain King, nasty little dwarfs, wandering into a cave) were drawn from a single classic narrative source, such as the story of Peer Gynt, rather than a hodgepodge of fantasy cliche's. I tried to respect this integrity in the few additions I made to fill out Crowther's obviously abandoned work.

Don Woods helped Crowther overcome the problem of the game's unfinished nature by significantly expanding the complexity of the cave and by adding improved scoring and win subroutines. It's this latter version which is normally referred to as "the original adventure." In homage to this latter title I have also made my re-coded version worth 350 points, although these points only represent six 50 point treasures. Only five of these treasures are present in Crowther's original. I have added one treasure and one puzzle and a few new threats to help add new challenge to the adventure. I have also slightly changed the operation of some of the magic of the original to prevent old hands from simply applying their prior knowledge.


Enjoy!

*Spoiler Alert * The following short video demo contains spoilers, so proceed at your own risk:


If you' want to know more about the history of Crowther's Colossal Cave Adventure, including the cave it was based on, see "Somewhere Nearby is Colossal Cave: Examining Will Crowther's Original 'Adventure' in Code and in Kentucky" by Dennis Jerz of Seton Hill University (Digital Humanities Quarterly, Summer 2007, Volume 1 Number 2). For a long time the original code was thought to be lost but Jerz was able to arrange its recovery from an old backup tape of Woods' student account. Jerz's analysis shows that Crowther's original program was a game and not simply a spelunking simulation as is commonly thought. It included magic words and other fantasy elements. If you want to compare my re-coded version to the original Fortran program someone has got the original Fortran source running under modern Fortran compiler conventions.

Ant also has an interesting blog on the mainframe game development system "Wander", which apparently preceded Colossal Cave (1974). He helped recover it from digital possible destruction. Another victory for retrogame "archeology," of such a concept makes sense. See John Aycock's book of that name: https://www.springer.com/gp/book/9783319300023.

Source code for my BASIC version of the game can be found here:
https://github.com/jggames/trs80mc10/tree/master/quicktype/Text%20Adventures/ColossalCave

4 comments:

  1. Hi. I've forked your ADVENT code on GitHub to port it to BBC BASIC for the BBC Micro -- hope I didn't do anything wrong; I'm not too familiar with GitHub.

    https://github.com/ahope1/trs80mc10/commit/c20e264268a508fbee40078de346107b672a6e60

    https://github.com/ahope1/trs80mc10/commit/75752b96a342a215befbc5ef4c4df9271381e14b

    ReplyDelete
    Replies
    1. Just change the 32 in line and the 31 in line 3 to 40 and 39 respectively and you'll get 40 columns.

      Delete
  2. Thanks for doing the port from Fortran, btw!

    ReplyDelete
  3. No problem. Let me know if you have any trouble. There's a word wrap routine at the top of the code. It's for 32 characters. You could easily change it to 40.

    ReplyDelete