[MUD-Dev] Java or LPC (DGD)?

T. Alexander Popiel popiel at wolfskeep.com
Mon Aug 11 13:14:33 CEST 2003


In message: <000001c35efe$e2197850$0200a8c0 at revenant>
bjchamb at bellsouth.net writes:

> I know both well, and have arguments both ways.  Which language
> would be better to use when developing a MUD from scratch?

[checklist of several points]

> Are there any points for either of the two that I missed?  Which
> of the points that I put in there aren't really significant?
> Which language would you recommend?

Speed is largely irrelevant; assuming a dedicated machine, modern
CPUs make light work of the small scale text-munging of running a
MUD.  Also, the speed or lack thereof for Java is chimerical; it all
depends on how you compile it and what sort of JVM you use.  Native
compiled Java (as opposed to bytecode) is on par with C++ for speed,
and there are some bytecode VMs which are pretty speedy, too.

One major factor you may have overlooked is DGD's ability to replace
game code on the fly, without an engine reboot.  Trying to do this
in Java is generally problematic, if the VM you're using supports it
at all.  This comes into play particularly if you're trying to fix
bugs without downtime.

Memory usage is another important issue.  Java very much encourages
creating lots of intermediate/temporary objects, particularly if you
are manipulating Strings.  The immutability of these basic objects
(and the boxed Integers, Characters, etc) tends to get in the way of
efficient handling, leading to much data copying and garbage
collection.  If your garbage collector gets behind, then the process
size bloats disturbingly.  LPC (when last I looked at an LPC
library) doesn't have this heavy emphasis on object creation, and
strings are mutable, so memory doesn't get nearly as thrashed.

DGD is superior in its ability to do CPU time limiting on various
threads, so you don't get runaway code which crashes the entire
system.  Java (per the spec) doesn't have such a concept, and I
don't know of any VM implementations that support such.

The security model of LPC may be more applicable to what you're
doing than that of Java... it's been long enough since I worked with
LPC that I don't know the details of what's readily supported.

Generally, I'd suggest DGD's LPC over Java, simply because it's
better tuned to the application in question (long running processes
which do a lot of text munging and often need to be updated on the
fly).

- Alex
_______________________________________________
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