[MUD-Dev] Object Representations?

KevinL darius at bofh.net.au
Wed Aug 16 19:19:20 CEST 2000


Hi all,

So, I'm at the stage with Moebius where I'm getting rather unhappy with just 
shoveling text around.  We've just recently added multiple IO module 
support, and a fairly trivial little XML-RPCish io module, so that client's 
can call methods direct on the server's objects (and vice versa, which opens 
the door for things like a "renderHTML" method to render a form for logging 
in... but I digress ;).

What I'm doing at the moment is just packaging up all the text outbound as 
basic data packets - clumps of text.  What I'd _like_ to do is somehow 
indicate, within that, which bits are important - give the client a leg-up on 
parsing this stuff.  Bearing in mind here that the client need not be a 
player-run program, it could be an NPC's AI, so distinguishing objects from 
text is very useful...

I've started digging through the mud-dev archives, and will be spending the 
next few days hunting for references to anything vaguely approximating this, 
but I thought if any of you know of prior work on this - representations of 
objects and text within the mud, or in being sent externally - I'd love to 
hear about it ;)

Example, in case I've not explained myself clearly, and people are still 
reading - this is text snipped from Moebius:

ID: 17> who

Sociopath hates modems.                  |:| Darius' Workshop (80)     [  4hr]
Bruce Foreign devil                      |:| Darius' Workshop (80)     [  3hr]
Darius werking                           |:| Darius' Workshop (80)     [  0sec]

ID: 17> 

(The id number in the prompt here is an aid to memory, not crucial ;)

At the moment, the 'who' command sends this straight to the player - through 
two places where translation can occur: one that was designed for NPC's to 
hook (parseFrom), which has access to objects etc., and one (the io module) 
that has no concept of objects, it just knows about sockets and data.

So the code for 'who' just outputs this stuff straight to the client - that 
format is coded into the command itself.  Bletch.  What I'd like to do is 
somehow code it up so the builder, on creating a command like 'who', would 
send not formatted lines, but object references, or object attribute 
references, to the player - who would then decode and display as appropriate 
to them, maybe with reference to a "suggested format" thing somewhere or 
something.

Objects can be many different things - a page of a book, for instance, has 
author, page number, text, date of writing...  Spitting all those to the 
client, or spitting an object reference, rather than pre-formatting and 
sending, would be nice.

Another example:

ID: 17> NewPlayer chats: 'New Arrival'
ID: 17> bwarff chats: 'I have arrived.'
ID: 17> bwarff  waves

Be nice to pull that out somehow, so the client knows which bits of the text 
are references to a player, which are text, whether the text incoming is an 
emote, or a say, or an event generated by the engine, or what.

That's about it - I guess the only other concern I have is keeping all this 
simple enough for builders to write their own commands without boggling - 
asking them to write fully specced up XML seems a touch overboard, especially 
if they just want to print "Darius falls asleep" ;)

So, that's it - apologies for long email, hope people have pointers to useful 
stuff somewhere.  I'm going to try and summarise what I'm finding on the 
Moebius web pages, if it turns out to be of general interest - I should do a 
bunch of docco work for Moebius anyway... ;)

TIA,
KevinL




_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
http://www.kanga.nu/lists/listinfo/mud-dev



More information about the mud-dev-archive mailing list