Note some non-influences.
[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 games,
5 the grandaddy of interactive fiction, and one of the hallowed artifacts
6 of hacker folklore.
7
8 The very first version was released by Crowther in 1976, in FORTRAN on
9 the PDP-10 at Bolt, Beranek, and Newman. (Crowther was at the time
10 writing what we could now call firmware for the earliest ARPANET
11 routers.) It was a maze game based on the Colossal Cave complex in
12 Kentucky, including fewer of the D&D-like elements now associated with
13 the game.
14
15 Adventure as we now know it, the ancestor of all later versions, was
16 was released on a PDP-10 at the Stanford AI Lab by Don Woods in 1977
17 (some sources, apparently erroneously, say 1976). That version is
18 sometimes known as 350-point Adventure.
19
20 Between 1977 and 1995 Crowther and Woods themselves continued to work
21 intermittently on the game. This main line of development culminated
22 in the 1995 release of Adventure 2.5, also known as 430-point Adventure
23
24 The earliest port to C was by Jim Gillogly under an early Unix running
25 at the Rand Corporation in 1977; this version was later, and still is,
26 included in the BSD Games collection.  It was blessed by Crowther and
27 Woods and briefly marketed in 1981 under the name "The Original
28 Adventure".
29
30 Many other people ported and extended the game in various directions.
31 A notable version was the first game shipped for the IBM Personal
32 Computer in 1981; this, for which neither Crowther nor Woods nor
33 Gillogly were paid royalties, what "The Original" was competing
34 against.
35
36 The history of these non-mainline versions is complex and
37 murky. Functional differences were generally marked by changes in the
38 maximum score as people added puzzles and rooms; however, multiple
39 ports of some versions existed - some in FORTRAN, some in C,
40 some in other languages - so the maximum point score is not
41 completely disambiguating.
42
43 Same articles at <<DA>> are a narrative of the history of the
44 game.  There is an in-depth study of its origins at <<SN>>.
45 Many versions are collected at The Interactive Fiction Archive
46 <<IFA>>; note however that its dates for the earliest releases
47 don't match other comments in the code or the careful reconstruction
48 in <<SN>>.
49
50 Future versions of this document may attempt to untangle some of the
51 non-mainline history. For now, it will suffice to explain the chain of
52 provenance that led from the original Adventure to the version
53 distributed with this document.
54
55 The original 350-point ADVENT on the PDP-10 had been one of my
56 formative experiences as a fledgling hacker in 1976-77. Forty years
57 later, in February 2017, while doing some casual research into the
58 history of text adventure games, I looked through some source code at
59 <<IFA>> and was delighted to learn of Adventure 2.5, a version of the
60 Crowther-Woods mainline later than I had ever played.
61
62 Adventure 2.5 had been shipped long enough ago that today's conventions of
63 open-source licensing were not yet fully established. The Makefile
64 contained a rights reservation by Don Woods and that was it.
65
66 I wrote to Don asking permission to release 2.5 under 2-clause BSD;
67 he replied on 15 May giving both permission and encouragement.
68
69 Here is what Don said about differences between the original Adventure
70 and 2.5:
71
72 ............................................................................
73 > The bulk of the points come from five new 16-point treasures.  (I say "bulk"
74 > because I think at least one of the scores included some padding and I may
75 > have tweaked those.)  Each of the new treasures requires solving a puzzle
76 > that's definitely at the tricky end of the scale for Adventure.  Much of the
77 > new stuff involves trying new directions and/or finding new uses for stuff
78 > that already existed; e.g. the forest outside is no longer a small number of
79 > locations with partially random movement, but is a full-fledged maze, one
80 > that I hope has a character different from either of the previous two.
81
82 > As the text itself says, V2.5 is essentially the same as V2, with a few more
83 > hints.  (I think I came up with a better one for the endgame, too.)  I don't
84 > seem to have a copy of the similar text from V2, so I don't know whether/how
85 > it described itself to new and seasoned players.
86
87 > The other big change, as I mentioned above, was I added a way of docking
88 > points at a certain number of turns.  This was my second attempt to do what
89 > the batteries had been for: require being efficient to achieve top score.
90 > Alas, the batteries led to players deliberately turning the lamp off/on
91 > whenever they weren't moving or were in a lit area, making the game take
92 > even longer!  I set the requirement at what felt like a hard but fair
93 > number of turns, then applied several sneaky tricks to shave off another
94 > twenty.
95 >
96 > I hacked up a wrapper around the game (still in Fortran, most likely, but
97 > I forget) that would try each initializing the RNG using each second of a
98 > given day, while feeding in a script that either worked or aborted early
99 > if anything went wrong (such as a dwarf blocking my path).  As I recall,
100 > it took less than a day's worth of RNG seeds to find one that worked.
101 >
102 > I verified my script could work given a favorable RNG, and stuck
103 > that number in the message.
104
105 > I like how that final puzzle, unlike the game itself, does not readily
106 > succumb even given access to the game source.  You really need to fit
107 > together not only the goals and the map and use of inventory space, but
108 > also details like just what _can_ you do in the dark...?
109 ............................................................................
110
111 == Earlier non-influences ==
112
113 There is record of one earlier dungeon-crawling game called "dnd",
114 written in 1974-75 on the PLATO system at University of Illinois
115 <<DND>>.  This was in some ways similar to later roguelike games but
116 not to Adventure.  The designers of later roguelikes frequently site
117 Adventure as an explanation, but not dnd; like PLATO itself, dnd seems
118 not to have become known outside of its home university until
119 rediscovered by computer historians many years after Adventure
120 shipped.
121
122 There was also Hunt The Wumpus <<WUMPUS>>, written by Gregory Yob in
123 1972. Though the wumpus was later included as a monster in the Nethack
124 roguelike game, there is no evidence that Yob's original (circulated
125 in BASIC among microcomputer enthusiasts) was known to the ARPANET- and
126 minicomputer-centered culture Crowther and Woods were part of until well
127 after Adventure was written.
128
129 == Nomenclature ==
130
131 This project is called "Open Adventure" because it's not at all clear
132 to number Adventure past 2.5 without misleading or causing
133 collisions. Various of the non-mainline versions have claimed to be
134 versions 3, 4, 5, 6, 7 and for all I know higher than that.  It seems
135 best just to start a new numbering series while acknowledging the
136 links back.
137
138 We have reverted to "advent" for the binary to avoid a name collision
139 with the BSD Games version.
140
141 == Functional changes in Open Adventure ==
142
143 By default, advent issues "> " as a command prompt.  This feature
144 became common in many variants after the original 350-point version,
145 but was never backported into Crowther & Woods's main line before now.
146 The "-o" (oldstyle) version reverts the behavior.
147
148 A "seed" command has been added.  This is not intended for human use
149 but as a way for game logs to set the PRNG (pseudorandom-number generator) so
150 that random events (dwarf & pirate appearances, the bird's magic word)
151 will be reproducible.
152
153 A -l command-line option has been added. When this is given (with a
154 file path argument) each command entered will be logged to the
155 specified file.  Additionally, a generated "seed" command will be put
156 early in the file capturing the randomized start state of the PRNG
157 so that replays of the log will be reproducible.
158
159 Using "seed" and -l, the distribution now includes a regression-test
160 suite for the game.  Any log captured with -l (and thus containing
161 a "seed" command) will replay reliably, including random events.
162
163 The adventure.text file is no longer required at runtime.  Instead, it
164 is compiled at build time to a source module containing C structures,
165 which is then linked to the advent binary.
166
167 == Sources ==
168
169 [bibliography]
170
171 - [[[IFA]]] http://rickadams.org/adventure/
172
173 - [[[DA]]] http://www.filfre.net/sitemap/
174
175 - [[[SN]]] http://www.digitalhumanities.org/dhq/vol/1/2/000009/000009.html
176
177 - [[[DND]]] https://en.wikipedia.org/wiki/Dnd_(video_game)
178
179 - [[[WUMPUS]]] https://en.wikipedia.org/wiki/Hunt_the_Wumpus