What's been considered a superb model for good coding (in 1960's-style FORTRAN, no less!) for some thirty years? It's Will Crowther's Adventure, a game in the tradition of Dungeons & Dragons, but based on a real cave. His source code has recently been released online, and an article in Digital Humanities Quarterly, cited widely around the Internet (including Slashdot) analyzes it from many perspectives.
I guess it's appropriate that one of the early classics of programming is a game, because play is essential to invention (I'll put a plug for my short story Fair Players here in passing). The beauty of Crowther's work seems to be replicated at several levels:
- The elegance of the game's design, which drew in players and kept them fixated on the task at hand
- The careful breakdown of data, layering several tables on top of a simple form of state transition to take people between places and activities
- An evocative writing style that brought the mixture of reality and fantasy to life for the player
I'll end with a marginally related anecdote. As a high-school student in 1977, I heard from a friend about a game he played at MIT, where his father was a professor. At this time in computer evolution, printing out a game of Life on successive sheets of paper at the teletype machine (our school was a fairly advanced one, and offered students time on a time-sharing system) was a pretty impressive experience. As my friend described spaceships circling around a computer screen shooting at each other, always being careful not to be sucked into the gravitational field of a star, I thought he was making it all up. It was the stuff of science fiction. It was also the real game Space War, as I later discovered. Within a decade, the Amiga made it seem a lot less exotic.


Comments (2)
While the code is pretty cool, alot of the really ugly bits are to get around limitations in the language. FORTran wasn't very good at string handling. Later languages made this much easier. But also earlier ones. ADVENT, as i knew it (TOPS-10 had 6 character file names?), might have been easier to write in LISP, or macro-10.
About when i saw this game, a friend commented that calculators (TI-59, etc.) had languages that reminded of machine language. In fact, macro-10 (the machine language for the PDP-10 computer) had instructions for floating point multiply and divide, just like my calculator. Further, it had instructions for moving and comparing bytes. So, it was a better match for string manipulation.
I hear there's already a port to g77, the GNU Fortran.
Posted by Stephen | August 21, 2007 3:30 PM
Thanks for the link to the article in Digital Humanities Quarterly about dear ol' Adventure. You might want to update the link to http://www.digitalhumanities.org/dhq/vol/001/2/000009.html
Posted by Elizabeth Wiethoff | September 20, 2007 6:41 PM