Re: [theory] Corpses, and other such things...

From: Tony Maro (tony@maro.net)
Date: 04/15/00


> -----Original Message-----
> From: Circle Discussion List [mailto:CIRCLE@post.queensu.ca]On Behalf Of
> Axiem
> Sent: Saturday, April 15, 2000 5:35 PM

> The problem is when I get to mobiles. I plan on having mobiles and
> players use the same basic structure (as it practically is now), but if
> I load mobiles according to the model above, where do players fit in? Of
> course, I could set up a base structure that either has player or mobile
> properties, and all the macros check for mobileness. I can't see any
> major ramifications as of yet.

I can't speak Circle specific, but I'm programming a MUD from scratch using
OOP.

I created a base "Mobile" object that has all the common characteristics for
both
players and npc's.  No plain Mobile objects are ever created.  I then use
object inheritence to create a "Player" object that includes the socket
links to allow control.  I also create an "npc" object that inherits from
Mobile
as well and includes the specifics on how it controls itself.

I originally designed it that both players and npc's used the same
structure,
however I decided to break up my code better into modules.

I also did something kinda different with spells.  All spells are in a
dynamically
linked library that is loaded on demand.  I can actually change some game
code
such as modifying a spell to tweak balance, or creating entirely new spells,
all
without restarting the MUD by issuing a special imp command.  It will pause
all
processing, unload the DLL of choice, rename it to _old, rename the new dll
to
the working name, and reload it.  Then, action continues - all in a fraction
of
a second, without kicking out the players.  Same thing for npc activity.

-Tony


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 04/10/01 PDT