lazerdix wrote:I'm no OpenGL expert, but I'm sure it has to do with the amount of data sent back and forth. The whole landscape is being constantly streamed on a connection that can't be any faster than your standard cable connection (unless jorb has a T1 and I'm just full of myself).
That theory couldn't be correct for a lot of reasons, but still, that only happens when anything actually changes, so it doesn't account for the client being slow even when everything is static.
lazerdix wrote:Also: You are sending graphical assets in real time, yes? If that is a right assumption, I think a downloaded client (as opposed to one that streams) with all assets in place would be more efficient then one that loads on the fly. Just have them load from the harddrive when needed.
By default, everything is fetched from the JAR file; HTTP fetching is only used when something is missing (usually because we've added some single thing and I haven't made a new JAR file for it, since that would just be an unnecessarily large download for a change of a few kilobytes at most), and even then, once it has been downloaded it is cached locally, so normally things are only downloaded once.
lazerdix wrote:Also the fact you're using java doesn't help. It's stupid hard to optimize to any computer, especially the hardware your common userbase probably has.
Now, I do dislike Java with a passion, but that's for entirely different reasons. I think people tend to underestimate the performance of Java. The Hotspot VM is actually quite swell when it comes to optimization; in particular since it does some really cool optimizations that non-JIT compilers couldn't do even if they wanted (one of my favorites is the heavy inlining of functions where even just a
currently monadic type can be detected, along with dynamic deoptimization of the same code in case that type invariant breaks due to classloading -- even if the code is currently running!). Likewise, thanks to garbage collection, the memory allocator is stupendously fast (under a GCing memory system, heap allocation is as simple as stack allocation; it's just a matter of incrementing a pointer).
In fact, I've been doing some quite heavy profiling on the drawing code, and I was able to optimize it a lot in the beginning (yes, it was even slower to begin with, believe it or not), but right now it seems almost
all time is spent in the actual drawing primitives. Of course, modern graphics hardware simple cannot be that slow, so I cannot really interpret it other than me abusing OpenGL somehow.
Game over, thanks for playing! Please do try again, I'd really love to get useful comments on it.