[MUD-Dev] [DGN] [NEWBIE] Suggestions on (OO) Server Design.

Sean Middleditch elanthis at awesomeplay.com
Sat Apr 6 12:07:27 CEST 2002


On Thu, 2002-04-04 at 14:08, Kwon Ekstrom wrote:
> From: "Sean Middleditch" <elanthis at awesomeplay.com>
>> On Wed, 2002-04-03 at 02:32, Pure Krome wrote:
 
>>>   To start the ball rolling, I've been trying to get my head
>>>   around the concept that in a mud, the objects, NPC's, PC's and
>>>   even rooms are all derived from a THING, and broken down into
>>>   more specialised children as you go down.  I'm wondering if
>>>   other people have designed such muds being this abstract, yet
>>>   working?
 
>> Yes, I've done just this (to a shomewhat lesser degree) in
>> AweMUD. After doing it, tho, I'm quite unable to decide what the
>> advantage is...  I think having some concrete types (thing,
>> character, room, etc.) and then adding hooks (with a scripting
>> language) would probably make the code a *lot* simpler, faster,
>> and more easily extensible.

> The advantage is a single point of access.  Done properly, you
> should be able to modify details common to all child objects by
> modifying the parent.  You can also add abilities to all child
> objects in the same manor.  Plus, there's nothing preventing you
> from using your hooks in addition to this approach.

Yes, the single piont of access is probably the one nice thing about
C++/OO.  ^,^

> I haven't noticed any speed degredation, and my end code is very
> simple to deal with.

I wouldn't think you would notice it.  You'd have to rewrite it
entirely in non OO form, then benchmark it.  Simply, tho, optimizing
OO code is very hard, becuase the language/compiler hides so many of
the details, and adds lots of unneccessary overhead in places where
it isn't necessary (but the overheard is necessary in other places,
and compilers aren't smart enough to tell which is which).

The reason having very small, very fast code is useful with MUD
engines is that a lot of MUD hosts and other providors don't give
you very many resources to work with.
_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev



More information about the mud-dev-archive mailing list