Major cleanups. Pre-process loop back in main loop, pre-processing abstracted into...
[open-adventure.git] / history.adoc
1 = A brief history of Colossal Cave Adventure =
2 by Eric S. Raymond
3
4 Adventure is the fons et origo of all later dungeon-crawling computer
5 games, the granddaddy of interactive fiction, and one of the hallowed
6 artifacts of hacker folklore.
7
8 == Origin and history ==
9
10 The very first version was released by Crowther in 1976, in FORTRAN on
11 the PDP-10 at Bolt, Beranek, and Newman. (Crowther was at the time
12 writing what we could now call firmware for the earliest ARPANET
13 routers.) It was a maze game based on the Colossal Cave complex in
14 Kentucky, including fewer of the D&D-like elements now associated with
15 the game.
16
17 Adventure as we now know it, the ancestor of all later versions, was
18 released on a PDP-10 at the Stanford AI Lab by Don Woods in 1977
19 (some sources, apparently erroneously, say 1976). That version is
20 sometimes known as 350-point Adventure.
21
22 Between 1977 and 1995 Crowther and Woods themselves continued to work
23 intermittently on the game. This main line of development culminated
24 in the 1995 release of Adventure 2.5, also known as 430-point Adventure
25
26 The earliest port to C was by Jim Gillogly under an early Unix running
27 at the Rand Corporation in 1977; this version was later, and still is,
28 included in the BSD Games collection.  I have it from Don Woods directly
29 that "[Jim Gillogly] was one of the first to request and receive a copy 
30 of the source" but that Woods did not actually know of the BSD port
31 until I briefed him on it in 2017.  (This contradicts some implications
32 in third-party histories.)
33
34 Many other people ported and extended the game in various directions.
35 A notable version was the first game shipped for the IBM Personal
36 Computer in 1981; neither Crowther nor Woods nor Gillogly were paid
37 royalties.
38
39 The history of these non-mainline versions is complex and
40 murky. Functional differences were generally marked by changes in the
41 maximum score as people added puzzles and rooms; however, multiple
42 ports of some versions existed - some in FORTRAN, some in C,
43 some in other languages - so the maximum point score is not
44 completely disambiguating.
45
46 Same articles at <<DA>> are a narrative of the history of the game.
47 There is an in-depth study of its origins at <<SN>>.  Many versions
48 are collected at The Interactive Fiction Archive <<IFA>>; note however
49 that IFA's historical claims are thinly sourced and its dates for the
50 earliest releases don't match either comments in the code or the
51 careful reconstruction in <<SN>>.
52
53 == Open Adventure ==
54
55 An attempt to untangle and document a lot of the non-mainline history
56 has been made by Arthur O'Dwyer at <<QUUX>>.  For our purposes, it
57 will suffice to explain the chain of provenance that led from the
58 original Adventure to the Open Adventure distributed with this
59 document.
60
61 The original 350-point ADVENT on the PDP-10 had been one of my
62 formative experiences as a fledgling hacker in 1976-77. Forty years
63 later, in February 2017, while doing some casual research into the
64 history of text adventure games, I looked through some source code at
65 <<IFA>> and was delighted to learn of Adventure 2.5, a version of the
66 Crowther-Woods mainline later than I had ever played.
67
68 Adventure 2.5 had been shipped long enough ago that today's conventions of
69 open-source licensing were not yet fully established. The Makefile
70 contained a rights reservation by Don Woods and that was it.
71
72 I wrote to Don asking permission to release 2.5 under 2-clause BSD;
73 he replied on 15 May 2017 giving both permission and encouragement.
74
75 Here is what Don said about differences between the original Adventure
76 and 2.5:
77
78 ............................................................................
79 > The bulk of the points come from five new 16-point treasures.  (I say "bulk"
80 > because I think at least one of the scores included some padding and I may
81 > have tweaked those.)  Each of the new treasures requires solving a puzzle
82 > that's definitely at the tricky end of the scale for Adventure.  Much of the
83 > new stuff involves trying new directions and/or finding new uses for stuff
84 > that already existed; e.g. the forest outside is no longer a small number of
85 > locations with partially random movement, but is a full-fledged maze, one
86 > that I hope has a character different from either of the previous two.
87
88 > As the text itself says, V2.5 is essentially the same as V2, with a few more
89 > hints.  (I think I came up with a better one for the endgame, too.)  I don't
90 > seem to have a copy of the similar text from V2, so I don't know whether/how
91 > it described itself to new and seasoned players.
92
93 > The other big change, as I mentioned above, was I added a way of docking
94 > points at a certain number of turns.  This was my second attempt to do what
95 > the batteries had been for: require being efficient to achieve top score.
96 > Alas, the batteries led to players deliberately turning the lamp off/on
97 > whenever they weren't moving or were in a lit area, making the game take
98 > even longer!  I set the requirement at what felt like a hard but fair
99 > number of turns, then applied several sneaky tricks to shave off another
100 > twenty.
101 >
102 > I hacked up a wrapper around the game (still in Fortran, most likely, but
103 > I forget) that would try each initializing the RNG using each second of a
104 > given day, while feeding in a script that either worked or aborted early
105 > if anything went wrong (such as a dwarf blocking my path).  As I recall,
106 > it took less than a day's worth of RNG seeds to find one that worked.
107 >
108 > I verified my script could work given a favorable RNG, and stuck
109 > that number in the message.
110
111 > I like how that final puzzle, unlike the game itself, does not readily
112 > succumb even given access to the game source.  You really need to fit
113 > together not only the goals and the map and use of inventory space, but
114 > also details like just what _can_ you do in the dark...?
115 ............................................................................
116
117 Great care has been taken to preserve 2.5's exact gameplay as intended
118 by Don.  However, under the hood Open Adventure is rather different from
119 2.5.  Where 2.5 was written in FORTRAN mechanically translated into extremely
120 ugly C, Open Adventure has been translated into much more modern and
121 idiomatic C.  The extremely cryptic and opaque format of the original
122 database of rooms, objects, and strings has been moved to YAML;
123 this makes the brilliant design of it much easier to comprehend.
124
125 == Earlier non-influences ==
126
127 There is record of one earlier dungeon-crawling game called "dnd",
128 written in 1974-75 on the PLATO system at University of Illinois
129 <<DND>>.  This was in some ways similar to later roguelike games but
130 not to Adventure.  The designers of later roguelikes frequently site
131 Adventure as an influence, but not dnd; like PLATO itself, dnd seems
132 not to have become known outside of its own user community until
133 rediscovered by computer historians many years after Adventure
134 shipped.
135
136 There was also Hunt The Wumpus <<WUMPUS>>, written by Gregory Yob in
137 1972. There is no evidence that Yob's original (circulated
138 in BASIC among microcomputer enthusiasts) was known to the ARPANET-
139 and minicomputer-centered culture Crowther and Woods were part of
140 until well after Adventure was written.
141
142 (I was a developer of the Nethack roguelike early in that game's
143 history, in the late 1980s; we knew nothing of PLATO dnd.  We did know
144 of Hunt The Wumpus then from its early Unix port, but it didn't
145 influence us either, nor in any apparent way the designers of other
146 early roguelikes. After my time the wumpus was included as a monster
147 in Nethack, but this was done in a spirit of conscious museumization
148 after historians rediscovered Yob's game.)
149
150 Neither of these games used an attempt at a natural-language parser
151 even as primitive as Adventure's.
152
153 == Sources ==
154
155 [bibliography]
156
157 - [[[IFA]]] http://rickadams.org/adventure/
158
159 - [[[DA]]] http://www.filfre.net/sitemap/
160
161 - [[[SN]]] http://www.digitalhumanities.org/dhq/vol/1/2/000009/000009.html
162
163 - [[[DND]]] https://en.wikipedia.org/wiki/Dnd_(video_game)
164
165 - [[[WUMPUS]]] https://en.wikipedia.org/wiki/Hunt_the_Wumpus
166
167 - [[[QUUX]]] https://github.com/Quuxplusone/Advent