[MUD-Dev] Re: darkness/visibility

J C Lawrence claw at under.engr.sgi.com
Mon Jun 22 15:14:41 CEST 1998


On Thu, 11 Jun 1998 15:02:02 +1200 (NZST) 
Oliver Jowett<oliver at jowett.manawatu.planet.co.nz> wrote:

> The problem, I think, is one of character memory: if you just turned
> off the light switch, you should know it's there to turn on again
> (at least for a while), barring sadistic puzzles involving moving
> switches.. Conversely, if you just walked into the room, you know
> nothing about a light switch (although searching for one by feel is
> feasible).

> I don't have a good solution for this. Suggestions?

Do the same thing that Infocom did (which maps to the room model well,
but not the coordinate model).  You retain two data sets for a
character in a location:

  1) What he can see right now.

  2) What he has seen shortly before now (eg before the lights went
     out).

This can be as simple as a "knows-about" contextual structure hung off 
the character's current state.  The depth of the context can be quite
brief (only as far as the current room, or longer:

    > l
    You are in a room.  There is a switch on the wall.
    > north
    You are in a different room.
    > south
    You are in a room.  There is a switch on the wall.
    > flip switch
    It is very dark.
    > north
    Ok.
    > south
    Okay.
    > flip switch
    You remember where the switch was from the last time you saw this
      room, and with a bit of feeling around, flip it.  The lights
      come back on!  You are blind.
   
You can also extend towards processes of discovery:

    > l
    You are in a room.  There is a switch on the wall.
    > flip switch.
    It is dark.  You hear a grue!
    > flip switch
    What switch?  You can't see anything!  You can hear a grue
      however.
    > feel wall
    What wall?  I can't see no wall!
    > north
    Ouch!  You walk into a wall.
    > feel wall
    Its pretty rough, and very flat.  Oh!  Something sticks out of the
      wall at about chest height.  It feels like a little stick,
      perhaps switch or something at about chest height!
    > flip switch
    The light comes on.  You are blind.  A grue screams.

--
J C Lawrence                               Internet: claw at null.net
(Contractor)                               Internet: coder at ibm.net
---------(*)                     Internet: claw at under.engr.sgi.com
...Honourary Member of Clan McFud -- Teamer's Avenging Monolith...




More information about the mud-dev-archive mailing list