Re: Inform coding problem


10 Jun 1995 10:54:35 GMT

Peter Wright <peterw@cs.uwa.oz.au> wrote:
> [How do you code this?]

Class Stairwell
has light
with description [ i;
print "The grey, cold, bleak, featureless, echoing stairwell \
is one of the infamous design ~features~ of the CS \
department. The stairs lead ";
if (self.u_to ~= 0) { print "up"; i = 1; }
if (self.d_to ~= 0) {
if (i == 1) print " and ";
print "down";
}
if (self.e_to == 0 && self.w_to == 0) ".";
print ", and there is a door to the ";
if (self.e_to ~= 0) "east.";
"west.";
];

But I wouldn't have too many such similar rooms in your game - I started
out with something similar in my game-in-progress, but received
complaints about how dull all the staircases were. You should really
add a something unusual to each location; a different feeling on the
part of the player, sounds from behind the door, a window looking out
over the campus.

--
Gareth Rees