[MUD-Dev] Re: MUD Design doc (long)
efindel at io.com
Fri Jan 1 22:06:01 New Zealand Daylight Time 1999
On Friday, January 01, 1999, Emil Eifrem wrote:
> At 02:21 AM 12/24/98 , J C Lawrence wrote:
>>> What good reasons are there for separating NPCs and PCs?
>>The usual argument is simplicity and performance. By making them
>>the same you remove the possibility of using short-circuit logic in
>>your NPC's or their AI's, thus imposing extra logic which is really
>>only needed for players and their typoes, command goofs,
>>guess-the-verb-games etc. By devolving NPC's to a simpler form you
>>can bypass that and present a much simpler and in many ways more
>>elegant API to the NPC AI's.
>>George Reese IIRC has written articulately on this in
>>rec.games.mud.*, but I'm unable to find the reference right now.
> K, I'll be sure to look it up on dejanews. I decided to not separate PCs
> and NPCs early on in my design and didn't pay it much mind -- I never quite
> managed to find any major advantages to having them separated.
> I have a distinction between player and character that I think helps; where
> player is an actual rl person connecting to the mud, while a character is
> one of possibly many in-game entities that that player may control.
My own thought is that they should be separate where it makes sense
for them to be separate, and the same where it makes sense for them to
be the same.
When I was working on Psyber Age, I set things up like this:
- The "in-game" portions of all characters were represented by
- The "control" portion of a character was either a shell (for PCs)
or a "mind" object (for NPCs).
Thus, PCs and NPCs had bodies that were exactly the same, but the
things controlling those bodies were different. All the shell logic
(alias expansion, etc.) was in the shell object -- and since NPCs
didn't use a shell object, their commands didn't go through that
This separation had some other nice effects. For example, it made it
easy to implement switching from one character to another, and it was
also easy to allow admins to "take over" monsters.
A couple of things I never got around to, but which should have been
- Having one "mind" control multiple "bodies." This could be useful
for implementing NPCs with group minds (Psyber Age was to be an SF
mud, so this was a consideration).
- On the weird side, you could have multiple objects controlling one
body. This could be useful for handling magical compulsions,
> I use single inheritance for my world object hierarchy so multiple base
> objects and other issues associated with multiple inheritance (I didn't
> include the multiple-inheritance quote from your mail) won't be any
> problem. The only immediate drawback I see about a global grammar is the
> requirement to recompile your server in order to add a verb or command
> instead of shoving that responsibility to the world scripting language.
You could have a global grammar and still have verbs/commands be
implemented in the world scripting language. Lima does this -- verbs
are LPC programs in the mud, but the driver handles parsing (verbs
have to register themselves with the driver).
> That inflexibility may end up being tedious and restraining on the
> builders, such as when JoeBuilder wants 8 new small commands for his new
> cool area, but will have to wait for lazy coders and the next code update
> instead of just adding it dynamically by script. It may or may not be a
> problem, depending on the length of one's code-update cycle and how
> soft-coded one's server is.
It can also help quality control, though... some of the eight commands
that JoeBuilder wants to add may be synonyms for existing commands
that he doesn't know about.
Also, if commands are implemented in the scripting language, it may be
possible for JoeBuilder to code the new commands and then turn them
over to the person/team in charge of commands.
> Yes. "cast my damagespell" was an ill-chosen example since it's normally
> limited by both time and mana. Now, with the reservation that I don't know
> anything about your combat system except for what I read in your post, it
> seems to me that if two people were fighting with non-resource-limited
> skills (such as 'kick'), *without* any player-command-lag the person with
> the fastest client/connection would win.
> So I would assume that you've made sure that all your (combat-)commands are
> limited by something other than time. Or am I thinking too narrow here?
On SWmud, we chose to limit the rate at which commands could be
entered. Specifically, you can't enter more than five commands per
second (if you try, the excess commands are simply thrown away).
We chose that rate because we found that it was about as fast as we
could enter commands that we had aliased to one letter.
|\ _,,,---,,_ Travis S. Casey <efindel at io.com>
ZZzz /,`.-'`' -. ;-;;,_ No one agrees with me. Not even me.
|,4- ) )-,_..;\ ( `'-'
More information about the MUD-Dev