More documentation polishing.
[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 == Nomenclature ==
112
113 This project is called "Open Adventure" because it's not at all clear
114 to number Adventure past 2.5 without misleading or causing
115 collisions. Various of the non-mainline versions have claimed to be
116 versions 3, 4, 5, 6, 7 and for all I know higher than that.  It seems
117 best just to start a new numbering series while acknowledging the
118 links back.
119
120 We have reverted to "advent" for the binary to avoid a name collision
121 with the BSD Games version.
122
123 == Functional changes in Open Adventure ==
124
125 By default, advent issues "> " as a command prompt.  This feature
126 became common in many variants after the original 350-point version,
127 but was never backported into Crowther & Wood's main line before now.
128 The "-o" (oldstyle) version reverts the behavior.
129
130 A "seed" command has been added.  This is not intended for human use
131 but as a way for game logs to set the PRNG (pseudorandom-number generator) so
132 that random events (dwarf & pirate appearances, the bird's magic word)
133 will be reproducible.
134
135 A -l command-line option has been added. When this is given (with a
136 file path argument) each command entered will be logged to the
137 specified file.  Additionally, a generated "seed" command will be put
138 early in the file capturing the randomized start state of the PRNG
139 so that replays of the log will be reproducible.
140
141 Using "seed" and -l, the distribution now includes a regression-test
142 suite for the game.  Any log captured with -l (and thus containing
143 a "seed" command) will replay reliably, including random events.
144
145 The adventure.text file is no longer required at runtime.  Instead, it
146 is compiled at build time to a source module containing C structures,
147 which is then linked to the advent binary.
148
149 == Sources ==
150
151 [bibliography]
152
153 - [[[IFA]]] http://rickadams.org/adventure/
154
155 - [[[DA]]] http://www.filfre.net/sitemap/
156
157 - [[[SN]]] http://www.digitalhumanities.org/dhq/vol/1/2/000009/000009.html