home *** CD-ROM | disk | FTP | other *** search
/ Fatal Distractions! / fataldistractions.bin / chap01 / ccr / readme < prev    next >
Text File  |  1993-07-10  |  8KB  |  194 lines

  1.  
  2.  
  3.                Colossal Cave Revisited
  4.         A TADS game with complete source code
  5.  
  6.          Copyright (C) 1993 David M. Baggett
  7.  
  8.       See the file readme.1st for terms of distribution
  9.                and use of this software
  10.  
  11.  
  12. What Have We Here?
  13.  
  14.    This game is a remake of the first major adventure game ever written:
  15. Colossal Cave, otherwise known as "Adventure."  The original Adventure
  16. was written in FORTRAN by Willie Crowther and Don Woods, and had only
  17. a simple two word command parser.  Its descriptions were so vivid,
  18. however, that it captivated a generation of computer enthusiasts and
  19. quickly became part of the "hacker lore."  References to Adventure
  20. crop up even today in games and other software.
  21.  
  22.    Adventure was such a significant event in computerdom that it
  23. spawned a whole genre of games, made even more popular by Infocom
  24. in the 1980's.  The MIT hackers who formed Infocom took the Adventure
  25. concept and added some powerful new technology to it: sentence parsing.
  26. Their first game, Zork, was clearly very much inspired by Crowther and
  27. Woods' original, but seemed more intelligent and was easier to play
  28. because it could accept simple sentences instead of just two-word
  29. directives.
  30.  
  31.    Eventually affordable computers got to be powerful enough to support
  32. general text adventure authoring packagaes, and by 1992 there were already
  33. nearly a dozen systems for would-be adventure authors to choose from.
  34. This remake of Crowther and Woods' original was written with TADS,
  35. one such adventure writing system, and is intended to be a tutorial
  36. example for TADS authors to learn from.  For this reason, great care
  37. has been taken to keep the code easy to read and understand.
  38.  
  39.    Colossal Cave Revisited (CCR) is also meant to give a new
  40. generation of computer gamers an opportunity to play the game that
  41. started it all, in a format they will feel more comfortable with.
  42. Today's text adventurers have been "spoiled" by the nice sentence
  43. parsing that most games have these days, and it is the author's hope
  44. that this reimplementation will make the original Adventure -- a
  45. classic that still shines today -- accessable to a wider audience.
  46.  
  47.  
  48. Implementation Details and Philosophy
  49.  
  50.    I have tried to be as faithful to the original game as possible
  51. throughout the project.  To start off on the right foot, I went back
  52. to Donald Ekman's excellent PC port of what seemed to be the original
  53. DEC-10 FORTRAN source code.  Don tells me he typed a significant
  54. portion of that source in from a paper listing -- now that's
  55. devotion!  In any case, few changes had to be made to get the game
  56. running under DOS, so the source I used to make CCR is largely
  57. "untainted."
  58.  
  59.    Retrofitting such an old game onto a more sophisicated game engine
  60. created a few philosophical problems.  Games these days are expected
  61. to have "decorations;" little bits of scenery mentioned in the room
  62. descriptions that you can't actually do anything with, but make
  63. the setting feel more real.  The original Adventure didn't have many
  64. decorations, and the two-word parser prevented players from trying
  65. things like "look under y2 rock," "put the rod in the stream," etc.
  66.  
  67.    The approach I took was to add decorations every reasonable place
  68. without writing much new prose.  Where prose exists in the original
  69. game, I used it, even to the extent of making bits of room
  70. descriptions serve double duty.  In a number of places I wrote
  71. entirely new text.  In these cases, I either wrote something
  72. innocuous or tried my best to mimic the style of the original.
  73.  
  74.    The new sentence parser created similar problems for game play.
  75. Whereas in the original you had to say "throw axe" to attack
  76. something, you can now do things like "attack bear with lamp."  There
  77. is no analogue to this in the original source; "throw lamp" would be
  78. interpreted as a request to drop the object.  Here again, I used
  79. response text whenever available and strived to stay consistent with
  80. the overall tone of the original when crafting new prose.  From the
  81. beginning I wanted walkthroughs for the original to still work in
  82. CCR; this is largely true now, though there are surely a few
  83. exceptions.
  84.  
  85.  
  86. Hints to Programmers Who Want to Modify Colossal Cave Revisited
  87.  
  88.    Colossal Cave Revisited isn't meant to be an unchanging mass of
  89. archival source code.  On the contrary, I hope that people will add
  90. new features, objects and locations.  If you do add things, please
  91. let me know so I can incorporate the changes into the official
  92. distribution.
  93.  
  94.    Modifying any large program is daunting at first.  CCR is about
  95. 13,000 lines of source, and that's a lot of code to read through.
  96. Fortunately, you shouldn't have to pay much attention to the grungy
  97. details of most of it, since I've tried my best to make it easy to
  98. modify.
  99.  
  100.    With this is mind, here are a few tips to make building and
  101. changing CCR simpler:
  102.  
  103.    * Have a suitable compiler.  You need a compiler for TADS 2.0.13
  104.      or higher.  Earlier versions of the compiler won't understand
  105.      some of the constructs used in the CCR source code.  Similarly,
  106.      you will need a version 2.0.13 or later run-time system to run it.
  107.  
  108.    * Use (or at least follow) the makefile.  Some of the options 
  109.      in the makefile are crucial, and if you don't specify them when
  110.      compiling ccr.t, you will get mystifying error messages.  In
  111.      particular, be sure to compile with the -mp option set large
  112.      enough, and make sure you make the cache small enough (with the
  113.      -m option) if you're running under MS-DOS.
  114.  
  115.    * Make extensions optional.  The easiest way to do this is to
  116.      add flags to the "global" object in ccr-std.t that enable or
  117.      disable your new code.
  118.  
  119.    * Use the existing classes whenever possible.  Classes are already
  120.      defined to make your life easy.  In addition to the basic TADS
  121.      classes, make sure you understand the definitions and use of the
  122.      following:
  123.  
  124.      ccr-item.t:
  125.  
  126.     class CCR_treasure_item
  127.  
  128.      ccr-npc.t:
  129.  
  130.     class NPC
  131.  
  132.      ccr-room.t:
  133.  
  134.     class CCR_room
  135.     class CCR_alike_maze_room
  136.     class NoNPC
  137.     class CCR_dead_end_room
  138.     class lightroom
  139.     class Outside
  140.     class NotFarIn
  141.     class CCR_decoration
  142.  
  143.     class floatingdecoration
  144.     class rfd (room feature decoration)
  145.  
  146.    * Set global.debug to true to get extra information about room 
  147.      connections and NPC movement at run-time.  The game will check
  148.      its connections to make sure everything's OK at run-time.
  149.  
  150.      Add new debugging code enabled by this flag for your own
  151.      extensions.
  152.  
  153.    * When defining new classes or puzzles, copy an existing similar
  154.      implementation and then modify it to suit your needs.  Starting
  155.      from scratch is always harder than updating already-working code.  
  156.  
  157.  
  158. Some Ideas
  159.  
  160.    Here are a few things that I considered doing myself, but decided
  161. to leave as exercises.  (Yeah, that's the ticket.)  They range from
  162. fairly trivial to incredibly time-consuming:
  163.  
  164.    * Add hints.  The original gave you hints at various times, but
  165.      would deduct points if the player took them.  Get Don Ekman's
  166.      PC port of the FORTRAN source and use the original hint text.
  167.  
  168.    * Make the NPC code more faithful to the original.  In particular,
  169.      dwarves don't block your way in CCR, while they did in the original.
  170.  
  171.    * Make the NPC movement code faster.
  172.  
  173.    * Make the descriptions of treasures sound more "excited."  The game
  174.      currently treats treasure like all other items when it tells you
  175.      about them:
  176.  
  177.     You see a rock here.
  178.     You see a platinum pyramid here, 12 inches on a side.
  179.  
  180.      Change ccr-adv.t so that it lists treasures separately, and
  181.      puts an exclamation point at the end.
  182.  
  183.    * Implement one of the "extended" versions of the games; e.g., the
  184.      550 point version with the sword in the stone.  Make sure you
  185.      update scoring so that your extensions fit in seamlessly.
  186.  
  187.    * Add your own NPC's, puzzles, or locations.
  188.  
  189.    * Port TADS to new machines so that CCR has a wider audience. (Contact
  190.      Mike Roberts at High Energy Software for more info.)
  191.  
  192. Whatever you do, please send me your changes!
  193.  
  194.