[MUD-Dev] Python script as stand alone MUD server...

Jason Slaughter rexrhino at hotmail.com
Tue Jan 27 16:20:45 CET 2004


Alistair Riddoch <alriddoch at zepler.org> wrote:

> Performance was a big problem. As I got involved in development,
> it quickly became apparent that we were going to need to do some
> serious work if we were going to scale beyond a dozen or so mobs
> and players per server.  I started to look at approaches to solve
> this, and immediately looked at compiled code as the solution. I
> am not an expert Python programmer, but the majority of the code
> had been written by another developer who is very experienced, and
> I had no reason to believe that the performance was due to bad
> coding. I investigated and experimented with a few approaches,
> including implementing performance critical components as compiled
> Python modules, and finally settled on re-writing the core of the
> application in C++, and keeping the high level code as scripts.

Where you doing something extremely elaborate with the mob AI? Or
was there some overhead because WorldForge (as I understand it) is a
3D graphic game? Or is Python performance really that bad? I
remember playing a mud (a DIKU mud I believe) back in the day
running on and old 486 machine with 16 megs memory. It seemed to
handle 50+ players and n number of mobs without a hitch. Even my
Xbox can handle more than 16 mobs or players in a full 3D online
action game! :)

Am I misunderstanding something, or am I correct in that (from your
experience) Python is ORDERS OF MAGNITUDE slower than compiled code?
YIKES, that doesn't sound good at all!!!

> Overall I think Python was an excellent language to build the
> original prototype in, given the rapid development cycle, good
> readability and ease of refactoring, but it does not seem as
> though even now Python is fast enough for a decent scale MUD
> server. It also works very well as an embedded scripting
> language. However if I was going to do the same job again, I would
> probably not look to C++. Its overcomplicated, difficult to debug,
> and takes a long time to learn.  Java now feels like a preferable
> option, especially given that Jython exists, and makes Python's
> introspection available from native Java and vice-versa. Free
> implementations of Java do exist - major applications like eclipse
> are becoming available built with gcj, part of the GNU compiler
> collection.

Hmmm... my second choice was to write the server in C++ for
Linux... if this is the case, I will probably eliminate scripting
(and keep it all C++ for simplicity), and just have a huge amount of
pre-written and easy configurable behaviors that I can attach to
mobs and objects.
_______________________________________________
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