adventure in python
Ported from Fortran IV, Crowther and Woods, 1977

words + imagination > graphics

I never got this far as a 16 year old in 1978!

Gameplay displayed on linux running cool-retro-term.

What's Unique Here?

There are a hundred and one adventure pages out there, so why another? Here are things you won't find elsewhere:


Screenshot of adventure on the HP Prime calculator

Background

More information on the real cave and life events that inspired adventure is available at this great page.

Conversion Effort

I ported adventure from the original FORTRAN IV to python. The initial effort is complete and it appears to be running fine, though the more people who play it the more sure we can be that the port was successful. The program is fairly complex, a massive block of code with few subroutines. The code assumes 36-bit words (cramming five 7-bit ascii chars into one word, yielding the 5-letter commands in the game), characters and integers are treated interchangeably, and then the maze of twisty little GOTOs... :-o These are all things that can't be done in python, resulting in opportunities to introduce bugs in the port. There is a good chance I have taken advantage of those opportunities! Please share bugs you find and, if possible, copy/paste the python stack trace showing the call sequence.

Crowther and Woods 1977 code is available at:

Crowther, W. and Woods, D. “Adventure”. [Aka “ADVENT” and “Colossal Cave”] FORTRAN source code. 1977. Accessed 18 Oct 2024. http://mirror.ifarchive.org/if-archive/games/source/adv350-pdp10.tar.gz

I successfully played to the end, as seen above, so have some confidence that all is well. But I do worry that undiscovered bugs exist. Wear your caving helmet and please email bug reports. Many thanks!

Mike Markowski, mike.ab3ap@gmail.com
Oct 2024

Download

Here are two python versions of the game. (Latest: 19 Nov 2024.)

The calculator version recognizes the HP command which toggles alpha shift. It is convenient when on so that text can be directly typed. However, it disables screen scrolling. If you want to scroll back to prior text, use HP to turn off shift-lock, scroll as you like, and then HP to turn shift-lock on again.

If the file hours exists, the game will allow play during those hours. By default, adventure can only be played during non-work hours. You can modify hours the same as back in the 70s by starting game and answering as follows:

  1. NO to "Do you want instructions?"
  2. MAGIC MODE must be first command.
  3. YES to "Are you a wizard?"
  4. DWARF, same default password as original,
  5. NO to "Do you know what I thought it was?"

A file hours is created, and must remain in the same directory where you run adventure to be found and used.

I bypassed the password challenge code that comes after the above sequence. It seems unnecessary in this day of single user machines, but can always be put back in place. Of course, you could argue that there is similarly no need for tracking prime time hours, but you have to accommodate nostalgia, too. After modifying hours, the game exits. The new hours are used when run next.

I added a new command RESUMe so that you can resume after a SUSPEnd. Originally, after a suspend it was up to the player to save a copy of the long obsolete magnetic core memory image. Even though the program now saves game state to a file, I left the CORE IMAGE message in for old times' sake and a smile.

The code can certainly be ported to run on other devices that run micropython. I hope to do so for the TI Nspire at some point.

Music

Don't start playing the game yet. Set the time machine to 1977 and listen to some hits of the day:

Music is rarely mentioned in retro-gaming circles, yet was a huge part of the times for me. Whether at home or in the university lab, I always had the stereo on and tuned to one of the local rock stations. As a matter of fact, I continue to do so in my lab at work.

Vocabulary

Little spoiler alert: Part of the charm of adventure is discovering the vocabulary that the game responds to. The challenge is fitting what you want to do into the 1 or 2 word constraint! The full vocabulary is listed here. If you don't mind giving up the enjoyment of discovering the words yourself, look at the list and you will likely find words you never tried.

Maps

Big spoiler alert: To debug my port of adventure I need detailed maps. I wrote subroutines that parse the adventure setup file to do various things.

  1. It lists where initial items of interest are placed.
  2. Generates complete lists of all verbs causing movement from one location to another.
  3. Outputs graphviz dot commands so that maps can be generated.

If you would like to experience virtual caving, do not look at these maps. They take the challenge out of making your own maps and experiencing late 1970s gaming. If you have already spent weeks or months of your life living in Colossal Cave, use the maps to see what you might have missed. With that warning, here are the maps.

Collosal Cave in VR


A DEC PDP-10 in the Main Office

I've also enjoyed working through the cave in VR, great fun. A nice touch is that upon entering the Main Office, a PDP-10 is seen in all its glory! This is the machine that adventure was written on and reference to its architecture is seen throughout the source code.

I took these snapshots while playing the game. Graphics can't compete with what our imaginations create while reading, but the 3d effect really is a lot of fun.

Here is the trailer on YouTube.

Web Analytics Made Easy - Statcounter