[MUD-Dev] Re: MUD Design doc (long)
Travis S. Casey
efindel at io.com
Mon Jan 4 12:57:46 New Zealand Daylight Time 1999
On Sat, 2 Jan 1999, Emil Eifrem wrote:
> At 08:48 PM 1/2/99 , Travis Casey wrote:
> >[Emil Eifrem:]
[description of scripting language snipped]
> So, aye, this could be used to implement most world manipulating commands
> and some skills. But why? For clarity, I feel it's either one or the other.
I was thinking that scripted commands could be used for a specific class
of commands. For example, with my split body/shell setup, I had bodies
handle commands that actually made the character do something (take
object, say, etc.) and the shell handle commands that involved things that
had no real analogue in the gameworld, such as setting aliases, setting
preferences, reporting bugs, reading administrative announcements, etc.
You could use the scripting language to do gameworld commands, but have
shell-type commands implemented in another way. This would allow builders
to add gameworld commands through the scripting language, but keep them
from adding shell-type commands.
> Hmmm, what do yuo mean? Surely, you're not saying that you have every
> single command coded for every object type you have out there? The code
> duplication would be enormous and like you say, maintainability and quality
> control non-existant.
> The most reasonable thing is probably to have some kind of 'default
> function' (be it via inheritance or some other construction) that handles
> everything but the 'unusual case,' where the builder overloads this
> 'default function' with his scripting code. This should probably be done
> regardless of whether you implement all your commands in the scripting
> language or in your static server.
Sorry... I was thinking in terms of a specific implementation there. It
can still be a problem with commands that individual builders add,
though. For example, if ten different builders add a "ugwy" command to
their areas, and you then decide that "ugwy" should be a standard verb in
the game, you have to find all the objects where those individual builders
added the "ugwy" command and take it out so the new standard
implementation will be used in those objects.
To put it another way, you *can* follow good practice when defining
commands in objects, but you're not forced to. From my own experiences
with builders, I'd prefer a system where they're forced to follow good
practice. (Especially if a lot of your builders aren't going to be CS
types -- in my experience, most CS people don't follow good coding
practices as much as they should, and non-CS people are generally even
worse about it.)
[Pointless anecdote: there was one admin on a mud I worked on who wrote
code that worked very well -- but her near-random indentation, odd
bracketing practices, and poor variable and function names made her code
nearly unreadable. Whenever I had to debug something she had coded, I
usually wound up having to reformat all her code and change variable and
function names just so I could read it before I could do any debugging.]
> Out of curiousity, what does SW stand for? Star Wars?
Yes. I'm no longer active there, and can't really recommend it as a great
example, but SWmud is still up and running. It's at
deathstar.dmatech.com, on port 6666, if anyone wants to see it. Kill a
stormtrooper and put on his helmet, if you go there. :-)
More information about the MUD-Dev