Newsgroups: rec.arts.int-fiction
Path: nntp.gmd.de!Dortmund.Germany.EU.net!Germany.EU.net!howland.reston.ans.net!cs.utexas.edu!news.sprintlink.net!alfa02.medio.net!guysmiley.blarg.com!eskimo!roc
From: roc@eskimo.com (Mark Riel)
Subject: Re: Several questions regarding Inform
X-Nntp-Posting-Host: eskimo.com
Message-ID: <DCKtuL.57s@eskimo.com>
Sender: usenet@eskimo.com (News User Id)
Organization: Eskimo North (206) For-Ever
References: <1995Jul31.013846.64076@rs6000.cmp.ilstu.edu>
Date: Mon, 31 Jul 1995 10:44:45 GMT
Lines: 84

In article <1995Jul31.013846.64076@rs6000.cmp.ilstu.edu>,
Christopher E. Forman <ceforma@rs6000.cmp.ilstu.edu> wrote:
>Hello, everyone.
>
>I have a few questions regarding the implementation of various aspects of an
>Inform game:
>
>1.) I'm a bit confused about creating a day/night cycle, to allow characters'
>    houses to be closed and locked up for the night, and to create the need
>    for food and sleep on the part of the player.  The manual seems to
>    contain little information on this topic.  Does such a feature require
>    modification to the TimePasses() routine?  If so, are there any examples
>    of this type of coding out there?
>
	Can't really help here. Make a generic outdoor room  object Class. Put 
code in that to check time of day, make the location light or ~light. I've 
never used timepasses, but somewhere you'd have to keep track of time. 
Check the manual for time stuff, some of this may already be there...

>
>2.) The game has a rather long introduction, so rather than make players
>    repeatedly press <RETURN> to get to the prompt, I've decided to ask if
>    a game should be restored before printing the intro.  Is there a function
>    in Inform that will allow a one-character (Y/N) response to be read from
>    the keyboard, similar to the getch() or getche() functions in C?
>
	Yep. The routine is YesOrNo(), returns true/false.

>
>3.) I've currently got it set up so it's possible to "EXAMINE THE FOREST"
>    in quite a few rooms in the game, but different responses are given for
>    different rooms.  I get the feeling that including a separate object
>    definition for each occurrance of the forest is very inefficient, so I
>    was considering doing something similar to the following:
>
>    Object Forest "forest"
>      with name "forest" "trees" "tree" "woods",
>           description [;
>             if (location == Room_1) "Description of forest for Room #1.";
>             if (location == Room_2) "Description of forest for Room #2.";
>             if (location == Room_3) "Description of forest for Room #3.";
>             "Description of forest for Room #4.";
>           ],
>           found_in Room_1 Room_2 Room_3 Room_4,
>      has scenery;
>
	This is fine.


>    Object Forest "forest"
>      with name [;
>             if (location == Pine_Forest) "forest" "trees" "pines";
>             if (location == Oak_Forest) "forest" "trees" "oaks";
>           ],
>           description [;
>! Insert descriptions here
>           ],
>           found_in Pine_Forest Oak_Forest,
>      has scenery;
>
	This isn't. Look into the parse_name routine. May be too much 
work for this effect.

>
>4.) The manual's description for the property 'each_turn' states that it is
>    active "each turn that the object is in scope, after all timers and
>    daemons have run."  Does this mean after they have run OUT, or just
>    after the routines for each timer/daemon have been processed for that
>    particular turn?
>
	That particular turn.

>
>5.) What do you set the property 'article' to if you don't want an article
>    printed at any time?  (The object I'm working with here is 'your hammer,'
>    and I want to avoid getting text like 'the your hammer' and 'a your
>    hammer.')
>
	Attribute 'proper' I think does this. Bought time someone made an 
IF with a carpenter as lead. (Well maybe Christ has been done...)




