Newsgroups: rec.arts.int-fiction
Path: nntp.gmd.de!news.ruhr-uni-bochum.de!news.rhrz.uni-bonn.de!RRZ.Uni-Koeln.DE!news.gtn.com!osn.de!noris.net!blackbush.xlink.net!tank.news.pipex.net!pipex!oleane!in2p3.fr!univ-lyon1.fr!howland.erols.net!spool.mu.edu!usenet.eel.ufl.edu!news-res.gsl.net!news.gsl.net!swrinde!news.sgi.com!news.msfc.nasa.gov!newsfeed.internetmci.com!in3.uu.net!nntp04.primenet.com!news.shkoo.com!nntp.primenet.com!netcom.com!erkyrath
From: erkyrath@netcom.com (Andrew Plotkin)
Subject: Re: IF CD Gimmick (Was RE: How To Make Money On IF)
Message-ID: <erkyrathDw2ACu.8GG@netcom.com>
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
X-Newsreader: TIN [version 1.2 PL1]
References: <4u6e50$ebf@daily-planet.execpc.com> <4u8mjf$ov1@newsbf02.news.aol.com> <baf.839806068@max.tiac.net> <4uod32$4md@flood.xnet.com>
Date: Tue, 13 Aug 1996 05:38:54 GMT
Lines: 39
Sender: erkyrath@netcom6.netcom.com

Michael Blaheta (mblaheta@flood.xnet.com) wrote:
> Quoth Carl Muckenhoupt:
> > I've always wanted a text adventure with tab-completion...
>
> That could give away puzzles.

So might name disambiguation, if you were designing the first IF game and 
didn't know how to deal with the concept.

I can think of a couple of ways to do tab completion in 
current-generation IF systems:

1: Have the read-line command return both when RETURN is hit and when TAB 
is hit. A special flag tells the game program which is which. If it was 
TAB, the game program generates a list of objects in scope, feeds it out 
to the interpreter somehow, and calls read-line again. 

The list of objects in scope is generally known to the player. If there 
are exceptions, the game program can easily be modified to leave them 
out. 

2: Have special tags which the game program can use to delimit bits of 
output text. The interpreter draws tagged text blocks normally, but saves a 
list of them for use in tab-completion requests. (This is rather like 
HTML's approach; text can be tagged with styles like "emphasized", but 
there is a special tag for hyperlinks.) As an added bonus, the user can 
click on a tagged block of text to copy-and-paste it to the command line. 

In this case, the author has to be sure to tag every commonly named 
object whenever it is mentioned. Kind of a pain, but not impossible. A 
lot of the job can be taken care of by diddling the object-name-print 
function. 

--Z

-- 

"And Aholibamah bare Jeush, and Jaalam, and Korah: these were the
borogoves..."
