[DGD] Re: Individual messages
Mikael Lind
z94lind at mtek.chalmers.se
Sat Jul 18 16:28:51 CEST 1998
On Sat, 18 Jul 1998, Serhat Sakarya wrote:
>> The solution that I came up with (and which probably isn't anything new) is
>> using message packets from which an each observer can generate a proper
>> message if she wants to. But it feels like a lot of work and I'm not sure
>> if it's worth it...
>
> Something along the lines of <ask /obj/player#123 for the custom message>
> instead of "Foo hits Bar"? Then every observer object can call some function
> (e.g. get_relayed_message) in the object "emitting" the message and get a
> custom one. I don't think it's too much work, but I don't think it's the
> best solution either.
The idea I had was more like <use this data structure to generate the custom
message>. But the netto effect is just the same. Typically, only observers
connected to a user would actually generate the message.
The messages would be distributed via some kind of event system, which would
also distribute information for unconnected creatures so that they could
react to another creature's actions without having to parse strings like
"Elemelf looks at you.\n".
The message data structure is so far an array with a format string (a bit
like the one used by the sscanf() kfun) and arguments for the formatting
(mostly objects). I haven't come up with any design that I like yet, though.
L Mikael "eLeMeL" Lind :: I wished for 4 cursed scrolls
z94lind at mtek.chalmers.se :: of gold detection and all I
http://www.mtek.chalmers.se/~z94lind/ :: got was this lousy .signature
List config page: http://list.imaginary.com/mailman/listinfo/dgd
More information about the DGD
mailing list