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?
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?
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;
Is this legal in Inform? (I'm still new at this, and just thought I'd
ask before I go chopping up my existing code.)
Also, can 'name' be defined in a similar manner? For example:
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;
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?
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.')
Thanks in advance for any help you can give me.
-- C. Forman