[MUD-Dev] Re: darkness/visibility

Richard Woolcock KaVir at nospam.dial.pipex.com
Sun Jun 14 11:42:38 New Zealand Standard Time 1998


Adam Wiggins wrote:
> 

[snip]

> I don't have a *good* solution, but one sort of proxy-solution that
> occured to me just now is that the object 'memory' for players might
> actually help alliviate the worst of this.  Usually this is shown as:
> 
> % get sword
> You pick up the sword.
> % examine it
> You examine the sword closely.

I cater for this, but only within a single parsed line.  For example:

   ]get the sword and examine it

I also differentiate 'it' and 'them' depending on whether or not the object
ends in the letter 's'.  I think I may well start storing these as variables,
thanks for the idea.  As a slightly off-topic question, any idea how you 
would deal with:

   ]get the bread from my backpack
   You get a loaf of bread from your leather backpack.
   ]eat it
   You attempt to stuff the leather backpack into your mouth.

I get around this at the moment by storing the most recent non-ending-in-s
object in the string into 'it' unless the object is a container and 'it' 
already has a value.  I'd like to somehow tie in references to 'it' and 'them'
to specific actions - food could be tied in to 'eat' while a sword might be
tied in to 'sheath', and a container could be tied in to 'get from'.  The
trouble is you end up with things like:

   [remove my backpack and get my sword and cheese from it, then eat it and
    sheath it

Which is...well...just silly.  Perhaps I should leave it as it is - its just 
that I feel I could take it further.

> In this case, as long as you didn't do anything else to manipulate another
> object in between, you could turn the light back on:
> 
> % flip switch
> The lights go out.
> % flip it
> The lights come on.
> 
> But:
> 
> % flip switch
> The lights go out.
> % flip switch on flashlight
> You flip the switch, but nothing happens.  Batteries must be dead.
> % flip it
> You flip the switch, but nothing happens.  Batteries must be dead.

You could always store the last X many objects each person has seen and
allow those objects to be referenced by name.

> Ie, you've "forgotten" about the switch on the wall.
> Note I'm assuming here that things in your possession are always visible
> at least in form, even if you can't read them.  There's nothing sillier
> than:
> 
>   <worn on head>  a heavy gold crown encrusted with jewels
> 
> (lights go out)
> 
>   <worn on head> something.
> 
> At the very least I'd expect:
> 
>   <worn on head> a heavy crown
> 
> or:
> 
>   <worn on head> something heavy and metallic
> 
> Here we get into defining object properties in realms other than vision,
> which IMO is a good thing.  But if you don't feel like doing a markup
> language or some other more advanced representation, a simple bit of code
> could check the object's material, weight, and basic type and come up with
> a name that the player could at least call it to get it off their head.

Or even 'remove something from head'?

My objects are different from regular diku objects in that I call a function
name_object() every time their description may have changed.  There is no 
reason why I could not perform a check to see whether the last person to have
seen that object could visually see it or not, and name_object() accordingly.
Thus I could have things like:

   ]look
   You are standing in a small room.
   There is a switch on the north wall.
   ]flip switch
   You flip the switch.  The lights go out!
   ]look
   It's pitch black, you cannot see a thing.
   ]feel
   You grope around in the dark.
   You can feel a small switch on the wall ahead of you.
   ]look inside my backpack
   It is too dark to see what is in there.
   ]feel inside my backpack
   Your backpack contains:
      A foot-long sharp blade.
      A small piece of cloth.
      A small wedge of some soft pliable material.

This would be under the assumption that people knew what they were 
wearing (not unreasonable - close your eyes and see if you forget 
what you are wearing).  I'm not sure if people should forget what
they are carrying inside containers or not though (can you remember
everything you are carrying inside your pockets right now?  What if
you feel inside your pockets, can you guess what those things are?).
It could certainly be used for objects lying in the room though, but
care would have to be taken to make sure 'feel' didnt just become a
form of night vision.

KaVir.




More information about the MUD-Dev mailing list