Newsgroups: rec.arts.int-fiction
Path: news.duke.edu!newsgate.duke.edu!nntp-out.monmouth.com!newspeer.monmouth.com!news.maxwell.syr.edu!news-hub.siol.net!zur.uu.net!ash.uu.net!world!buzzard
From: buzzard@world.std.com (Sean T Barrett)
Subject: Re: [Inform] Property Defaults and Infinite Hats
Message-ID: <GGE36G.ECE@world.std.com>
Date: Fri, 13 Jul 2001 02:06:16 GMT
References: <3B4DFC2F.6CB18B6C@csi.com>
Organization: The World Public Access UNIX, Brookline, MA
Lines: 39
Xref: news.duke.edu rec.arts.int-fiction:89715

John Colagioia  <JColagioia@csi.com> wrote:
>OK, technically, there are two questions, but here goes:

Hopefully somebody else will provide you with a more useful
answer, but I wanted to register these comments, since *somebody*
needs to say it, if only for the sake of other readers.

>(other than
>creating a "locations" class, which I'm not yet sure I want to do, for
>rather obscure reasons--but which DOES work, however)

Use a class for all your locations.  Don't forget you can use
multiple inheritence so you can bring in the necessary cant_go
through a special class if you have some problem with classes
being used for other purposes. (Obviously I'm guessing here at
what the mechanism of the obscure reason impacting the use of
classes is, and I could be wrong.)

>Assume I have a dozen or so NPCs, each of which (being a man in 1941 in
>that particular cartoon) is wearing a hat.  For space efficiency
>reasons, and also clarity of code, I would rather not create a hat for
>each NPC,

You should make a dozen hats. I note that this is one of the areas
where our insistence on using the old z-machine architecture hurts;
the amount of storage required is really pretty darn insiginificant
by modern machine standards.

It's also a feature I think adventure game languages should have--the
ability to specify a class as having components or children automatically.
We had a system like that in the commercial game "Thief: The Dark Project"
so a designer could place an object and it could automatically have
attached or orbitting or otherwise associated objects created.

However I will note that when I debated this same topic here a yearish
ago for the case of rooms having a 'floor object', I seemed
to be the only one who felt this way.

SeanB
