Newsgroups: rec.arts.int-fiction
Path: news.duke.edu!newsgate.duke.edu!news-hog.berkeley.edu!ucberkeley!newsswitch.lcs.mit.edu!howland.erols.net!portc.blue.aol.com.MISMATCH!portc03.blue.aol.com!uunet!dca.uu.net!ash.uu.net!world!buzzard
From: buzzard@world.std.com (Sean T Barrett)
Subject: Re: [Inform] Messages on the first turn
Message-ID: <GK120r.CJI@world.std.com>
Date: Fri, 21 Sep 2001 19:26:46 GMT
References: <3ba6ac6d$1@news.uow.edu.au> <3baafd3f$1@news.uow.edu.au> <GK0uqu.8qA@world.std.com> <slrn9qmttp.79.cerutti@fiad06.norwich.edu>
Organization: The World Public Access UNIX, Brookline, MA
Lines: 53
Xref: news.duke.edu rec.arts.int-fiction:92829

Neil Cerutti <cerutti@trans-video.net> wrote:
>Sean T Barrett posted:
>>What I originally did, then backed out to avoid making
>>gratuitous changes to the library, but which I would like to see
>>implemented if there is ever a 6.11 Inform library release, is
>>to go into parserm.h and add a call to a user-defined routine
>>between "<Look>;" and "while (~~deadflag)" (around line 3670 in
>>my lightly modified lib).
>
>What about this?
>
>    a5 entry point routines
>    LookRoutine() see 26
>    Called at the end of every Look action, that is, room
>    description. No return value
>
>It takes place just before the ##Look action is completed
>(right before ScoreArrival and AfterRoutines), but it seems close
>enough for most purposes to me.

For the sake of printing something "after the first room
description" or "before the first prompt", there's really
no difference; either way you have to hack in some kind of
"this is the first room description".

Because we expect things like "look" and "prompt-printing"
to be side-effect free, it would be a lot cleaner if there
were a sort of virtual "now is a time when things could
happen" between the event of looking and the event of printing
the first prompt.

Another way of looking at it is that Inform is hard-coded with
an initial sequence--call Initialise *here*; print the banner
imediately after (except if Initialise suppresses it entirely);
then do <Look>; then start the normal turn sequence.

In a designed-to-be-modified system, we'd have one short
replaceable routine with the start-up sequence up to the
initial loop (short because it just calls a couple of other
routines); a short replaceable routine with the main game
loop (short because it just calls a couple of other routines);
the code which transforms "ask X for Y" into "X, give Y to me"
wouldn't be in the aforementioned 200-line routine which
combines all of these things (and thus prevents things like
"<<AskFor badguy macguffin>>;" from working), etc. etc.

Coding it the way I described addresses one aspect of
a way in which the library is hardcoded--that nothing
occurs between the hard-coded <Look> and the first prompt.
Another example would be suppressing the <Look> entirely
(something I do in one of my old WNLIPs).

SeanB
