Newsgroups: rec.arts.int-fiction
Path: gmd.de!xlink.net!howland.reston.ans.net!pipex!sunic!uts!news.daimi.aau.dk!aau!joedal
From: joedal@dfi.aau.dk (Lars Joedal)
Subject: TADS: 'go to <location>', introduction
Message-ID: <joedal.752140302@dfi.aau.dk>
Sender: news@aau.dk
Nntp-Posting-Host: dfi.aau.dk
Organization: Aarhus University, Denmark
Date: Mon, 1 Nov 1993 07:51:42 GMT
Lines: 36

I've finally finished a TADS implementation of a 'go to <location>' 
verb (not to be confused with the debugging 'goto <location>' verb 
that another person posted some time ago).  This verb allows the 
player to issue a command like
    >go to the bookstore
and automatically a route is found (if there is any) and the player 
walks to the bookstore.

Implementation, documentation, and a sample game that uses the verb 
follows in three other posts.  All of this is public domain, you are 
free to put it into your own games.  In fact, that was what I 
programmed it for (as well as for fun), as I'm not in the process of 
developing any game myself, for the time being.

Notes:
   The task is not typical for adventure programming, so the code is 
not typical for TADS.  Please, no posts along the line of "if that's 
what TADS code looks like I'd much rather program my adventures in 
...".
   The code may look complicated (some of it is) and long, please 
don't blame this on TADS either.  It is correct that I've found it 
necessary to put in a lot more than the basic path-finding algorithm, 
but this is a result of TADS's flexibility.  Since the system so 
easily allows special cases to be put into a game I had to be careful 
about my assumptions of default behaviour.  Besides, the code is very 
heavily commented, which adds to the length of the code.  Removing 
all the comments will reduce the size of the code to about one half 
of it's current size (sic).

+------------------------------------------------------------------------+
| Lars J|dal                | Q: What's the difference between a quantum |
| email: joedal@dfi.aau.dk  |    mechanic and an auto mechanic?          |
| Physics student at the    | A: A quantum mechanic can get his car into |
| University of Aarhus      |    the garage without opening the door.    |
| Denmark                   |                    -- David Kra            |
+------------------------------------------------------------------------+
