08 Jul, 2009, flumpy wrote in the 1st comment:
Votes: 0
Well it's in the topic. Who here actually uses a Java based mud engine?

Anyone?
08 Jul, 2009, Kline wrote in the 2nd comment:
Votes: 0
I've always thought CoffeeMUD had some very neat features, and almost attempted to use it, but I don't know enough Java to really do anything, so, no.
08 Jul, 2009, bbailey wrote in the 3rd comment:
Votes: 0
flumpy said:
Well it's in the topic. Who here actually uses a Java based mud engine?

Anyone?


I've used CoffeeMud for various projects over the last four years or so.
08 Jul, 2009, Scandum wrote in the 4th comment:
Votes: 0
Back in the 90s Java was slow as hell and tended to use entirely too much memory, it also had no native associative array support. How does Java measure up to ruby/lua/lpc and the likes nowadays?
08 Jul, 2009, David Haley wrote in the 5th comment:
Votes: 0
It's kind of hard to make that comparison. Java is closer to the C++ side of the programming language family than so-called scripting languages. For one, it's statically typed, which makes for a very different programming experience.

It still uses more memory than C++, and is usually slower (but not always, and not necessarily by much), but for very many purposes it is perfectly adequate.

It still doesn't have "native" associative array support, but map classes are part of the standard library.
08 Jul, 2009, bbailey wrote in the 6th comment:
Votes: 0
Scandum said:
Back in the 90s Java was slow as hell and tended to use entirely too much memory, it also had no native associative array support. How does Java measure up to ruby/lua/lpc and the likes nowadays?


I think it depends on whether you're talking about specific Java language implementations, or the JVM and its capabilities. Anecdotal evidence at least would suggest that it is now 'better', given the number of dynamic languages like Python (Jython) and Ruby (JRuby) that have implementations on the JVM. I imagine if your experience with Java is based solely on Java 1.4 and older implementations, it'd be worth a reexamination. The C implementations of those languages are, of course, faster, but the various jvm implementations (and presumably Java) have definitely come a long way.
08 Jul, 2009, Scandum wrote in the 7th comment:
Votes: 0
I did some quick research, and it appears Java is the fastest interpreted language, roughly 4 times faster than Lua, but in turn uses 8 times more memory. Not sure if these numbers are accurate, but they look favorable toward Java. I don't think the higher memory usage is a big deal.

As a side note, I've got a bunch of Java codebases listed on dmoz that didn't appear in the other topic: http://dmoz.org/Games/Online/MUDs/Develo... Inclusion is based on the quality of the webpage, not on the quality of the software.
08 Jul, 2009, Mabus wrote in the 8th comment:
Votes: 0
flumpy said:
Well it's in the topic. Who here actually uses a Java based mud engine?

Anyone?

I use CoffeeMUD (a highly modified 5.2 version) currently.

Been working with it for a few years now (since version 3.x-something). It is resource intensive (mainly memory intensive, as CPU usage is comparable to other MUDs), but really easy to design and implement with. I have found my time with it far more productive and enjoyable then all other code bases I have worked with previously.

The fact that it is under the Apache License is also nothing to sneeze at.
08 Jul, 2009, David Haley wrote in the 9th comment:
Votes: 0
It might be obvious to some but it's worth noting that a Java program's memory usage is fairly dependent on what the program itself is doing. It's easy to write Java code that uses memory very poorly. Good comparisons would compare similar data structures, or examine the overhead introduced by doing anything in Java vs. the same in, say, C++.
08 Jul, 2009, Mabus wrote in the 10th comment:
Votes: 0
David Haley said:
It might be obvious to some but it's worth noting that a Java program's memory usage is fairly dependent on what the program itself is doing. It's easy to write Java code that uses memory very poorly. Good comparisons would compare similar data structures, or examine the overhead introduced by doing anything in Java vs. the same in, say, C++.

It might be obvious to some, but it is worth noting, that I was speaking about a specific program, CoffeeMUD, and not all Java programs.

I was merely answering the OP's question in as honest a fashion as I could.
08 Jul, 2009, Runter wrote in the 11th comment:
Votes: 0
I think he was responding to the 8 times more memory claim.
08 Jul, 2009, David Haley wrote in the 12th comment:
Votes: 0
Yes, I was making a comment about memory usage in Java as a language, and saying that it doesn't make much sense to look at any individual program's memory usage on its own as a benchmark for general Java memory usage. A fair comparison needs to compare apples to apples. I wasn't trying to accuse you of anything Mabus. :wink:
08 Jul, 2009, Mabus wrote in the 13th comment:
Votes: 0
Runter said:
I think he was responding to the 8 times more memory claim.

That could well be.

That is what makes quoting such a wonderful feature when addressing anything beyond the initial question.
08 Jul, 2009, David Haley wrote in the 14th comment:
Votes: 0
I was replying to several things at once, so I didn't feel it necessary to quote them all; I hoped it would be obvious enough that I was making a general comment and not trying to criticize your post. Sorry for the confusion…
08 Jul, 2009, Scandum wrote in the 15th comment:
Votes: 0
David Haley said:
Yes, I was making a comment about memory usage in Java as a language, and saying that it doesn't make much sense to look at any individual program's memory usage on its own as a benchmark for general Java memory usage. A fair comparison needs to compare apples to apples. I wasn't trying to accuse you of anything Mabus. :wink:

Looks to me like Java is pretty wasteful, though it could be due to 64 bit compatibility: http://www.roseindia.net/javatutorials/d...
08 Jul, 2009, David Haley wrote in the 16th comment:
Votes: 0
Java objects use more memory than C++ objects because they track more stuff. I wouldn't call it "wasteful" because the extra information is actually worth something; it's not just crap floating in space without any value.

The interesting question is in plain old overhead; the note about all data members using 4 bytes even if they're 1-byte values is something to think about.

In general you don't have to really worry about this, though. It comes up most if you're allocating a LOT of objects, because then the overhead can add up.

I wrote a game-playing program in Java that explored a search space of relatively complex game states, where every game state was an entire logical fact database, and transitioning from one state to the next required full logic proofs. It still tore through the search space, especially for simple games, expanding many thousand game nodes per second – this sounds small if you forget what goes into a state expansion (theorem proving). In Chess, for which our representation was far harder to generate proofs, it still expanded about 50 states per second.
25 Jul, 2009, Anasadi wrote in the 17th comment:
Votes: 0
Hi.

I just came across this topic, so I apologize for my lateness.

Scandum wrote:

Quote
Back in the 90s Java was slow as hell and tended to use entirely too much memory, it also had no native associative array support.


The game I help run, Dawn of the Ages, was written from scratch using Java. Development began in 1996, when Java was at version 1.0, and the game opened in 1999. The game still exists today. When I came aboard in the fall of 1999, I noticed no slowness in the game, and have never noticed it, as player or as implementor.

Java does use a lot of memory. Here's a breakdown of our game currently:

ArrayStore array: 11615/13552 stack: 220/644    Mobiles (4932 prototypes)
ArrayStore array: 35752/40461 stack: 3470/5724 Items (8008 prototypes)
ArrayStore array: 31263/32000 stack: 1406/2301 Affects (ticker)
ArrayStore array: 84/100 stack: 83/88 Affects (violence ticker)
14861 Rooms (280 areas)

Memory: 149620016 bytes (of 177532928 allocated)


In 1999 and thereabouts, memory usage may have been a substantial factor in deciding whether to use the language. The creators of the game, however, owned the box it ran on, and one of the coders hosted the box where he worked (an ISP). These days, with the existence of inexpensive virtual private servers (VPS), memory is hardly an issue. Dawn currently runs on a VPS allocated 512 MB of ram, which is way more than the game actually needs.

CPU also isn't an issue - at the moment I am writing this:

Average cpu usage: 3,668%.
Current cpu usage: 2,83%.


The VPS CPU is, I think, something like a 1.5 GHz processor (don't quote me - it's been a while since I checked.)

The benefits of using Java, on the other hand, are substantial. Exceptions, for example, do not cripple the game -

Dawn of the Ages started up at Tuesday, May 5, 2009 16:18:35 CEST
System time: Saturday, July 25, 2009 23:57:53 CEST


There's garbage collection, the ability to develop and add new code quickly, the ability to add other languages to the base (95% of the game is Java, and 5% is Scheme, and we've added experimental Groovy and Tcl recently), etc.

I cannot get much more detailed - I focus more on the building side of the house than the coding, and the main coder is Lisping (SBCL) a lot more these days. ;-)

Anasadi
26 Jul, 2009, Runter wrote in the 18th comment:
Votes: 0
For a MUD Java is plenty fast. Also, if you think of memory as relative to the cost of memory today and in the future—that's really a nonissue too for a MUD in development. Eg, 150 megs was way more in 1996 when your mud first began development. I always kinda have to scoff at people who suggest that Java may be too slow. It's actually pretty quick. A lot of what makes any mud slow, regardless of the language, is the programming practices employed. Poor ones usually expend while good ones save. It's usually just the good sense of the programmer to determine what constitutes a fair trade. (A fair trade for readability, rapid development, etc, in exchange for CPU or memory.)
26 Jul, 2009, David Haley wrote in the 19th comment:
Votes: 0
Also note that a lot of Java's apparent memory usage is allocation of the heap in OS space, but the heap is actually not necessarily used much in the VM space. So it's not correct to assume that the process memory usage is what is actually being used logically, as opposed to what the VM has allocated for you.
15 Aug, 2012, Squeegy wrote in the 20th comment:
Votes: 0
I use Java right now, as part of the CoffeeMUD codebase. We had to make a lot of tweaks to improve memory leaking and unticking and performance and various other bugs in the vanilla codebase, but it runs fairly smoothly now. I don't know how well it would handle large numbers of players, though; we only get 20 max.

e: Well, it's somewhat amusing this was asked 3 years back.
0.0/20