[vworld-tech] Modern MUD server design

Lee Faris teelf at ascendantmud.net
Thu Feb 19 20:26:31 PST 2004


Brian Hook said:

> Lee Faris said:
> > Why is that?  What advantages are there to writing the game logic
> > in a scripting language versus writing it in the same language as
> > the kernel.
>
> Not to state the obvious, but because you get all the advantages of
> the scripting language.  Assuming you believe that a language such as
> Python, Ruby, Lua, etc. has significant advantages for higher level
> application development than a lower level language, then using it for
> your game logic gives you a bunch of rapid development advantages.
>
> If you're using a compile/link language like C/C++, then having to
> recompile and relink everything just because you've changed an orc's
> pathfinding algorithm can suck since you have to bring down the world
> (you could, in theory, use shared libraries, but that presents its own
> set of problems).
>
> Basically, Python et. al. have a slew of advantages over C/C++ for
> logic programming.  C/C++ are great for many things, especially when
> you need good performance and tight control over memory layout, but
> Python et. al. are really nice for fast development.  Intrinsic
> garbage collection and dictionaries alone are practically worth the
> price of admission, then toss in all the various standard packages for
> sockets, io, SSL, etc. and it becomes a no-brainer.

I've been thinking about this for awhile (I'm a slow thinker), and I very
much agree.  It has become obvious from experience.

Thinking about it more, I remembered when I did a school project in Lisp.  I
remember that we did get off to a great start but we spent a lot of time
debugging runtime errors later on.  Then we did a project in ML and I can't
recall any runtime errors.  This would seem to stem from the type system of
the languages.

Since catching errors at compile time is preferable to runtime, why are the
main languages mentioned for server development all so weakly typed?  If
scripting languages arose out of the need to do small tasks quickly, then a
weakly typed language seems appropriate.  Runtime errors would be much
easier to find in a small amount of code.  But is it still appropriate to
code a large piece of software that needs to be highly stable in the same
language?

And thinking further (bear with me), what is specifically about C++ that is
undesirable?  Can we simply hook up a garbage collector to a mud server and
be able to develop just as 'fast' as with Python (taking into consideration
the debugging)?  Or if that still isn't a good solution because of the lack
of libraries then why aren't we all using ML?  Or barring any ML specific
issues, why aren't we all using a strongly typed 'scripting' language (does
it cease to be a scripting language if it's stongly typed..)?

I think that is enough for now...

Lee




More information about the vworld-tech mailing list