home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Unsorted BBS Collection
/
thegreatunsorted.tar
/
thegreatunsorted
/
misc
/
part1.doc
< prev
next >
Wrap
Text File
|
1985-11-16
|
29KB
|
604 lines
_____________________________________
| |
| The Generic Adventure Game System |
|_____________________________________|
(version 1.0)
Copyright 1985 by Mark J. Welch
Mark J. Welch
P.O. Box 2409
San Francisco, CA 94126
(415) 564-1066 (voice)
(415) 664-2811 (modem)
_____________________________________________________________
| |
| The Generic Adventure Game System (GAGS), including all |
| source code, object code, and manuals on paper or on disk, |
| are copyright 1985 by Mark J. Welch. "Generic Adventure |
| Game System" and "GAGS" are trademarks of Mark J. Welch. |
| GAGS is distributed as Shareware: if you like the |
| program, please become a registered used by sending $15 to |
| the author. Commercial use without prior written |
| permission is prohibited. See Appendix C for details. |
|_____________________________________________________________|
The Generic Adventure Game System
Copyright 1985 Mark J. Welch
Table of Contents
PART ONE (PART1.DOC) Introduction & How to Play
Files on the disk..............................................1-1
Hardware requirements..........................................1-1
Acknowledgements...............................................1-2
A Short History of Adventure Games.............................1-3
Enter GAGS?..............................................1-4
Other Adventure-Writing Systems..........................1-5
Further Reading..........................................1-5
Quick Start....................................................1-6
How to Play the Sample Game(s).................................1-7
Vocabulary...............................................1-7
Abbreviations............................................1-8
Special keywords.........................................1-8
Nouns....................................................1-8
Noise words..............................................1-8
Prepositions.............................................1-8
Playing the Game(s)......................................1-9
PART TWO (PART2.DOC) How to Write an Adventure Game
Why Should I Write My Own Adventure Game?......................2-1
How GAGS Works: A Superficial Explanation......................2-2
A Sequential Account.....................................2-2
How GAGS Works: Another Approach...............................2-5
Rooms....................................................2-5
Specials.................................................2-6
Nouns....................................................2-7
Text.....................................................2-8
PUSH/PULL/TURN/PLAY descriptions.........................2-8
Creatures................................................2-9
Some Last-Minute Notes........................................2-10
Order of definitions....................................2-10
Word Processors (data file format)......................2-10
Diagnostics Mode........................................2-10
Light and Darkness......................................2-11
Command Abbreviations...................................2-11
Creating a Typical Room.......................................2-12
Including Comments in the Data File...........................2-15
(continued)
Table of Contents (continued)
REFERENCE MANUAL (in PART2.DOC)
Introduction...................................................R-1
Opening (Title) Screen.........................................R-1
Structure of the .DAT (data) File..............................R-2
Description types........................................R-2
Nouns....................................................R-3
Rooms....................................................R-4
Creatures................................................R-5
Specials.................................................R-5
Text.....................................................R-6
Page Pauses..............................................R-6
Play/Push/Turn/Pull......................................R-6
INTRO text...............................................R-6
Lights and Darkness......................................R-6
Eating, Drinking, and Dying..............................R-7
Weight and Size..........................................R-7
Scoring/Points...........................................R-7
PART THREE (PART3.DOC)
The GAGS Source Code (briefly explained).......................3-1
In More Detail: The Parser.....................................3-3
Possible Source Code Enhancements..............................3-5
Enlarging the Game.......................................3-5
On-Line Help.............................................3-5
Specials.................................................3-5
Adding Verbs.............................................3-6
Multiple Nouns with the Same Name........................3-6
Creature Animation.......................................3-7
Time/Turn Sensitivity....................................3-7
User-Defined Verbs.......................................3-7
Attempts to Reduce the Size of GAGS............................3-8
APPENDICES (APPENDIX.DOC)
Appendix A: List of Verbs........................................A-1
Appendix B: Partial Map of Sample Game...........................B-1
Appendix C: Distribution (the Shareware Rules)...................C-1
Appendix D: Other Shareware......................................D-1
1-1
This is the manual for the Generic Adventure Game System (GAGS).
You do not need to know anything about programming to play the
adventure games on this disk or to develop your own adventure
games.
Files on the Disk
-----------------
Included on the disk are a number of files. If there is a file on
the disk called READ.ME or README.1ST, read that file before
going further. Please read Appendix C ("The Shareware Rules") before
making any copies of GAGS.
- ADVENT.COM The file ADVENT.COM is the executable game "engine"
program (generated by Turbo Pascal 3.0).
- ADVENT.00* Files beginning with ADVENT and ending with numbers
are overlay program files, which must be present on
the same disk and directory as ADVENT.COM.
- *.DAT Files with the extension (suffix) .DAT are data
(UNDERGND.DAT) files read by the ADVENT.COM program when it is
running; there are several complete adventure
games included on the disk in files ending
with .DAT.
- *.TTL Each file with the extension .TTL contains the
(UNDERGND.TTL) title file for a corresponding game file stored
in a .DAT file.
- *.DOC Documentation for GAGS is stored in files ending
with .DOC. These should be printed out and read
in the same order as they appear on the disk.
Hardware Requirements
---------------------
The Generic Adventure Game System requires a computer with at
least 256K of memory, MS-DOS 2.1, and at least one disk drive.
1-2
----------------
Acknowledgements
----------------
I'd like to thank the folks who helped me debug GAGS prior to its
formal release. Beta-testing software is usually a dangerous,
painful, and unrewarding task; in this case, since the program will
be distributed as Shareware, there was no financial reward except a
free disk or two. Several people found gamewriting an incentive by
itself, while others just wanted to poke around and discover bugs.
Many thanks to everyone who helped.
In particular, I'd like to thank Stan Heller and Katherine
Pyle, each of whom spent many hours actually developing playable
games, and each discovering many unexpected bugs and "features."
Mike Rauch provided the most eloquent and detailed plea for
improvements I've seen. Sue Rosenberg, Neil Rubenking, Andy Meyer,
Patrick Herron, Ezra Shapiro, Mike Farren, Mark Lovejoy, and Ctein
each offered important bug and performance reports. All of the
above (and a few others) provided insight without which GAGS would
be far less powerful and useful. All these poor souls got in
exchange is a free copy of version 1.0 and my thanks.
-------------------------
Structure of This Manual:
-------------------------
Part 1 explains how to play the adventure game(s) included on
the disk.
Part 2 explains how you can create new adventure games by
modifying the enclosed data files or by writing your own data
files. It also includes a complete reference manual.
Part 3 explains how the Turbo Pascal program is structured,
and how you can modify it to add features to the Generic
Adventure Game System or even overhaul it completely. The source
code is NOT included on this disk. It is available separately, to
registered users only, for $25; I also require that you sign an
agreement that you will not share the source code.
Appendices: (A) List of verbs
(B) Map of the sample adventure
(C) GAGS Distribution Policy
(D) Other Shareware
1-3
A Short History of Adventure Games
----------------------------------
You probably realize that there is a whole class or genre of
computer games called "adventure games." The genre, of course,
is loosely based on role-playing games. Indeed, the Original
Adventure and Dungeons and Dragons both became immensely popular
at the same time -- the mid 1970's -- on college campuses.
The grandfather of all adventure games was called simply
"ADVENTURE," and took place in "Collossal Cave." It was written
by Will Crowther and Don Woods in FORTRAN. To win the game, one
has to capture a bird, dispose of a nasty snake, avoid a dwarf's
pointy knives, and figure out what toll a troll wanted to cross
a bridge, among many other hazards; the rewards were many but
usually had to be sacrificed in order to obtain some other goal.
The game was quite successful -- partly because it was
virtually the only game available and partly because it was
freely distributed over ARPANET -- and was quickly copied onto
many large timesharing systems at universities and companies.
Many hours were spent translating the game so it could run on
many mainframes and microcomputers. Other programmers wrote
extensions into the game, adding new rooms, hazards, and
treasures. (The Original Adventure is available from Software
Toolworks, Pasadena, CA, as well as in a four-game pack called
"Golden Oldies, volume 1.")
While some programmers were satisfied by solving,
translating, or adding to the original Adventure, others saw an
opportunity for new games, on microcomputers as well as
mainframes. Some -- like Scott Adams at Adventure International
-- chose to add graphics to their adventures. Some had very
limited vocabularies and tight, simple grammers like the
original adventure: you could "EAT BIRD" or "ATTACK TROLL,"
nothing more complex.
Other programmers sought more natural language and more
powerful and complex features: Infocom's Zork trilogy -- a
variant on the original Adventure -- and that company's many
follow-up text adventures (they, and others, accurately call
their works "interactive fiction") use a complex vocabulary and
permit very long and complex sentences.
On the earliest microcomputers -- like the S-100 machines,
the TRS-80 Model I and the Apple II -- adventure games were the
first programs to be made available because they used only text
and were written in standard languages, usually BASIC, and were
thus easiest to translate.
Several efforts have been made to write "adventure game
generators," programs which would ask for input detailing the
arrangement of an adventure and then generate a BASIC program for
the scenario. Unfortunately, these generators too often were not
complex enough to generate powerful adventures, or were too
complex to use by someone who didn't want to write an adventure
game in the first place.
1-4
Enter GAGS
----------
The Generic Adventure Game System was written in an effort
to make writing an adventure game as simple as possible, while
still permitting a great deal of flexibility. It _cannot_ be used
to write an adventure game with as many complex features as
Infocom's. To do so would require developing a complete adventure
game programming language, as Infocom has done, and would require
adventure-game writers to learn a very complex set of rules.
Of course, developing ANY playable, enjoyable adventure game
takes time. You need to set up a map, and then type in the valid
movements from room to room and the full text descriptions for
each room, noun, and creature. While using GAGS is far less
complex than writing an adventure game from scratch in Pascal,
BASIC, or any other language, it will still take you many hours
to write a game using GAGS. Part II explains how you can write
your own adventure.
There are two clear advantages to the Generic Adventure Game
System (GAGS). First, GAGS uses a standard-format text file for
its data, and the adventure game can be modified simply by
editing the data file with any text editor. Debugging the game
involves playing it: as problems are discovered, the text file
can be edited and the game re-played. Once a basic game is
developed, it can be extended by adding new rooms or special
features (much the same way Adventure was enhanced).
Second, GAGS is infinitely expandable because the complete
Turbo Pascal source code is available. If you decide that another
verb should be available, you can add it. If you think the parser
is too simple, you can try to patch it -- or completely re-write
it. By modifying the source code, you can add new features to the
game which aren't available in the basic system. (Of course,
modifying the source code could lead to week-long debugging
sessions while you try to figure out why this particular
procedure is infinitely recursive or why the disk is reformatted
whenever you try to move east.) Part III of the manual explains
how the source code was written, and suggests a number of
modifications that can be made.
The complete source code to GAGS is available to registered
users for $25, and you are free to make any changes to that code
you wish. You can freely distribute any adventure game files you
write for GAGS, and you can distribute executable copies of the
ADVENT.COM file without paying any royalties, whether or not
you've modified it.
You may not distribute source code copies of GAGS, even if
you've made changes to the program. You are free to distribute
lists of the changes, of course; I just don't want people to get
the source code without paying for it.
1-5
-------------------------------
Other Adventure-Writing Systems
-------------------------------
Pete Levy has posted a copy of the "Levy Adventure Development
System" (LADS) on the Games SIG on CompuServe. It's written in
BASIC for the TRS-80 Model I and III; I believe versions for
other systems exist.
Eamon, a public-domain adventure-writing system for the Apple
II, is reportedly a good system as well. An enhanced commercial
version is also said to be available for about $40.
David Betz, author of the XLISP programming language, is also
developing an adventure-game programming langauge using a
similar syntax. While it will be more complex than GAGS, it will
also have more advanced capabilities.
Several commercial adventure writing programs are also
available. For the Commodore 64, CodeWriter Corporation's
Adventure Writer looks like a pretty good product. Electronic
Arts' Adventure Construction Set is primarily a graphics/arcade-
type system. Another program, Adventure Master from CBS, is
getting wide attention but generally poor ratings.
---------------
Further Reading
---------------
Several books are available on writing your own adventure game:
Tim Hartnell, "Creating Adventure Games on Your Home Computer"
(in Microsoft BASIC), Ballantine/Random House, 1984.
Richard C. Vile, Jr., "Programming your own Adventure Games in
(UCSD) Pascal," TAB Books, 1984.
Frank DaCosta, "Writing BASIC Adventure Programs for the TRS-80"
(Model I/III/IV), TAB Books, 1982.
The December, 1980, issue of BYTE magazine contains a number of
articles about adventure games. Articles include: "On the
Road to Adventure," by Bob Liddil; "Zork and the Future of
Computerized Fantasy Simulations," by David Lebling; and
"Character Variation in Role-Playing Games," by Jon Freeman.
1-6
-----------
Quick Start
-----------
If you've never played an adventure game before, the best way to
start to understand how an adventure game works is to play one.
Before you can do that, however, there are a few things you
should do first to protect yourself.
1. First, make a copy of the original disk that came with this
book, and put the original disk in a safe place. That way, if you
accidentally damage the disk you're playing with, you can still
re-copy the original.
To do this, place a formatted, bootable system disk in
drive B: and the original disk in drive A:, and type
"COPY A:*.* B:"
2. Reboot (Ctrl-Alt-Del), then type "ADVENT UNDERGND" at the DOS
prompt.
----------------
If you want, you can play this game as a regular adventure
game; below are some hints on how to play an adventure game. If
you prefer, you can "cheat" and peek at the map in appendix B and
the list of verbs provided in appendix A. You can cheat even more
by reading the file UNDERGND.DAT.
----------------
The Generic Adventure Game System requires that five files be on
your default disk:
ADVENT.COM The game program itself;
ADVENT.000 A program "overlay file"
ADVENT.001 Another overlay file
<filename>.DAT The data file for the game;
<filename>.TTL The opening title information.
The game will also function more smoothly if you have the
following two files on your disk:
COMMAND.COM The DOS command interpreter
CONFIG.SYS The DOS configuration instructions
If you're puzzled, type "ADVENT ?"
1-7
----------------------------------------------------
How To Play The Adventure Game(s) Provided with GAGS
----------------------------------------------------
----------
Vocabulary (examples)
----------
The Generic Adventure Game system understands a wide variety of
commands, but it is still easily confused. It has a very limited
vocabulary, totalling from one to four hundred words. While it
can understand some fairly complex sentences, there are some
pretty simple sentences it gets confused by.
Your commands should generally be in the format:
<verb> <noun phrase> <preposition> <noun phrase/object>
Some (hypothetical) examples of valid sentences:
put the red rock in the small bowl
read the poetry book
eat the celery
throw the battle axe at the werewolf
shoot the burglar with the revolver
fire the laser pistol at the alien mutant
get the book
push the red button
unlock the file cabinet with the steel key
go north
southwest
turn on the flashlight
General Rules
-------------
A list of valid verbs appears in an appendix, but you might
want to experiment and guess at valid verbs before reading it.
The usual directions are understood by the game (N, S, E, W, NE,
NW, SE, SW, UP, and DOWN; in some cases, 'enter' or 'exit' might
also be appropriate). Other events might also cause you to
change location: if you detonate a nuclear warhead, for example,
you'll likely be immediately transported somewhere far, far away.
You can try to 'take' or 'get' most things that are in a room
with you; you can 'examine' or 'look at' most visible nouns as
well, whether or not you are carrying them. You can 'drop' or
'throw' anything you're carrying. Eating and drinking are often
permitted, but eating strange things is usually foolish. If
something seems to be closed or locked, you can try to open or
unlock it.
1-8
Abbreviations
-------------
To look more closely at something, 'examine' it. The period
character ('.') is a synonym for 'examine,' so typing ".book" is
the same as "examine book." You can also abbreviate 'examine' as
'ex' (i.e. 'ex book'). The exclamation point ('!') is a synonymn
for "attack." To turn out a light, you can 'extinguish' it, and
'extinguish' can be abbreviated as 'ext' ('ext lamp').
Special Words
-------------
Certain words have special meanings to the game. 'Brief,' for
example, suppresses the automatic printing of room descriptions
each time you enter a new room; to return to full descriptions,
type 'verbose.' 'Score' will let you see how much progress
you've made and will give you an idea how much of the game you've
seen so far. 'Quit' will permit you to stop the game and return
to DOS. 'Save' will allow you to save the current game status,
and 'restore' will restore a previously-saved game.
There's no penalty for incorrect words: if the game doesn't
understand a word, it gives you another chance and doesn't count
the invalid input as a turn. If you try to do something foolish
("Eat chair"), the game counts that as a turn.
Nouns
-----
While the list of verbs is fixed from game to game, the nouns
change every time. One game might be filled with weapons and
creatures, while another might contain many keys and locks. Each
noun is unique: you won't find more than one "key," but you might
find a "brass key," an "access card," and an "entry pass." The
game only understands an adjective if it is correctly followed by
the matching noun: if "take red flute" is valid, it will not try
to guess what you meant by "take red" or "take red instrument" or
"take the red one." It will accept "take flute," but not "take
blue flute."
With some verbs, nouns are optional. For example, "north" is
quite clear by itself, and any "valid" words following it will be
ignored completely. "Eat" needs a noun of some kind, preferably
an edible one. And some things can't be accomplished unless you
specify a tool: "unlock padlock" isn't acceptable, while "unlock
the padlock with the brass key" is fine.
Noise Words
-----------
The word "the" is ignored; so are friendly words like
"please" and "now." (This way, "please put the red rose in the
small vase now" can be understoond, while the game will be quite
confused by "Please the sailor.")
Prepositional phrases
---------------------
In some cases, the preposition need not be followed by a noun
("turn the gas stove on" is fine), but often the game will be
puzzled unless you provide one ("unlock the padlock with" just
won't do).
1-9
Playing the Game(s)
-------------------
As you move around through the game, you'll notice that the game
provides a long text description of each room as you first enter
it. If you return to the room later, it's merely identified by a
short descriptive phrase in brackets. To see the full description
again, type "look" or "L". The game doesn't keep these long text
descriptions in local memory, but instead reads them from disk
each time it needs them. If you don't like this delay, you can
suppress the long text by using the "brief" command. "Verbose"
will bring them back.
You may be unable to find any more rooms in the adventure,
even though you know there should be more. Remember that strange
actions might be necessary to get from one room to another: in a
haunted house, for example, pushing the bookcase aside might
reveal a hidden staircase to the dungeon. In a more modern
adventure, you might have to figure out how to start and fly a
spaceship and fly to another planet, where more rooms await you.
In another adventure, you might discover that touching a rock
sends you somewhere new.