[MUD-Dev] Java or LPC (DGD)?
Ammon Lauritzen
ammon at simud.org
Mon Aug 11 11:49:22 CEST 2003
On Sun, 10 Aug 2003, Ben Chambers wrote:
> I know both well, and have arguments both ways. Which language would be
> better to use when developing a MUD from scratch?
> Java
> + Better syntax for objects (in my opinion, the C++/Java
> object system is much cleaner than the one used in LPC)
Yes, Java objects are much cleaner than LPC objects. However, LPC
objects are much more tolerant of version differences.
Also, all of the data types in LPC are much easier to deal with than
their Java equivalents, especially arrays and mappings. Structs have
been added to LPC recently, and with that, you wouldn't have to try
to use objects as data classes when all you care about is the
information.
> - Possibly slower?
Definately slower. Using the LDMud driver, I successfully ran a very
cpu-intensive mud on a 233mhz machine. Java... well, I don't
recommend trying to do anything interesting in Java on a box slower
than 500mhz, and when adding threading and everything else, it gets
increasingly ugly very rapidly.
> LPC
> + Gives persistence for free
I'm not sure what you're talking about here. Yes, save_object() will
dump an object onto disk, but if you're not planning on editing
files by hand, that's not much different than simply serializing a
java object.
> 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?
LPC is a scripting language, it is meant to be written and updated
and debugged while the server is running.
Also, you would use an already written driver to handle your
connectivity and act as your virtual machine (I recommend
LDMud). This would save a bit of time and effort writing a decent
server in Java (granted, that's not hard, but it would be
duplicating effort).
With Java, it is much more difficult to add and update on the
fly. And while you can do things on the fly, it becomes a royal
headache, especially when trying to use reflextion if that sort of
thing is necessary.
Both have support for external databases and system calls and
such. Both are perfectly viable options, however, I would recommend
LPC unless there is something that you absolutely need Java for,
such as if you were doing a whole lot of interaction with outside
systems - the LP Mud ERQ daemon is exceptionally difficult to deal
with (it has given me much grief when writing I3 support for our
lib).
Actually, I am considering writing some sort of mud in Java as a
personal project, but it would be a very specific sort of thing,
nowhere near as flexible as my LPC work has been.
Grin, if you really want to have fun, use PHP. It's the best of both
worlds.
--
Ammon Lauritzen
http://www.simud.org/
_______________________________________________
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