[MUD-Dev] Re: Recursive look
Michael.Willey at abnamro.com
Michael.Willey at abnamro.com
Thu Oct 22 10:42:26 New Zealand Daylight Time 1998
J C Lawrence wrote:
>The problem is not the customised enter/exit messages,
>the problem is that the character entering or exiting
>is generating his own enter/exit messages. This
>is backwards. IRL you don't tell people what they
>are going to see/hear when you enter/leave, they
>do their own interpretation.
>What should happen is that the translating character
>object should send a message to all the objects
>that will detect or react to his translation and
>*THEY* should then determine how they are going
>to represent this state change to their players.
>Thus, all the processing occurs at the point where
>it is both perceived and acted upon: at the receiving
>Of course this is minially N times more computationally
>expensive than having the state changing object
>do all the work, but them's the apples.
And that's how I've recently decided to handle a
large chunk of communication between objects, including
results of generic player commands. Not only does
it allow each object to interpret the action differently
as JCL pointed out, it also makes interpretation
by non-player controlled objects much easier.
One of my fellow DS'ers (and a listmember too, I
believe) has a set of NPC objects that, among other
things, parse text generated around them and react
to it in a very bot-like fashion. As the conventional
system stands, each action that another object takes
creates a result, which was interpreted into a text
output by the person who coded that action. Each
object that wants to react to that output must reinterpret
the text to divine the original result, then act
on that result. We're translating action into text,
then that text back into action. Sounds terribly
wasteful and prone to error.
I think it would be much easier to have objects
simply transmit notification of their actions &
results to each other via some global format and
only interpret that into text for players. What
I was thinking of was some sort of call to objects
in the area along the lines of
action_notify(verb, noun, direct_obj, indirect_obj)
So when Bubba gives a sword to Buffy, each object
gets a simple notification of the action and reacts
to it in turn.
Bubba sees: You give a sword to Buffy.
Buffy sees: Bubba gives a sword to you.
Bubba's arch rival sees:
Your hated enemy Bubba gives a sword to Buffy.
They must be plotting against you!
A stranger may see: A man gives a sword to a woman.
Ug the Caveman sees: Bubba give shiny stick to Buffy.
And poor Joe, who's just finished off a bottle of
hallucinogenic chemicals (mistakenly thinking it
was a magic potion) sees:
God gives your foot to a small green fish.
You smell purple.
NPCs don't have to waste time translating the actions
into text, but can react on them quickly and more
directly, so when Officer Bob sees that the sword
being traded is on a list of stolen goods, he tries
to arrest Bubba and Buffy.
More information about the MUD-Dev