We have translated downloadable copies of the classic interactive fiction Adventure game in the form of a fortran program and associated data file by Will Crowther. We distribute the translator as open source. github
Browse the Cave
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. map
End of Road Again is where the game traditionally starts.
Recent Changes will show every room in the order we generated them. Search is handy too.
You can play the game online elsewhere. There are many copies, most including refinements by Don Woods not found here. play
Browse the Code
After loading data structures, the code describes a place, parses input, then handles the described action. Subroutines handle input and output.
Fortran Main Program unraveled but not yet completely explained with hypertext and svg. map
Fortran Subroutines of which three are obvious and the fourth does something with bits.
Fortran Arrays that hold text and other state.
More Data Structures
I didn't know the fortran names for these data file segments. Here I call them what they seem to be.
Rooms (dump) lists each room by number. The program keeps track of your location by storing the room number in LOC. The variable L is often set to a room number in anticipation of logic delivering you there.
Words (dump) lists the words that the parser will recognize while playing the game. Only some are about travel among the rooms.
Dest (dump) encodes the web of connections between rooms and the words that will make the transitions.
Reply (dump) lists phrases that will be printed in response to action words.
Help (dump) lists all the hints and other instructions the game provides to help players learn by doing. The subroutine SPEAK presents this text.