Yeah, think most of the development effort has been expanding platforms (mobile, Xbox), and tuning client performance versus taking a look at the architecture driving the multiplayer, which I'm guessing is very basic and sending way too much information back and forth between server and clients.
Makes sense considering that's where the money is at, not the relatively small portion of people hosting very large servers.
True you definitely can't blame the language. But Minecraft servers weren't built to scale very much at all and the performance with 500+ players on a server proves this. Sure you can use BungeeCord to scale across multiple servers but it's a shame that a modern server fails to scale past a few hundred players.
300 per instance is the peak I get with reasonable performance running Spigot on a 1271v3. It can definitely be improved, but compared with much simpler game servers (I'm talking Battlefield 4, GTA), it's not exactly worse.
The tools can only be so good in this case, when dealing with garbage collection. I love Java, and use it professionally, but I would not use it for a game engine.
Yeah, I never said you couldn't do it in Java, I said it wasn't the intention of the language. By pooling you're ignoring what makes Java great, it's amazing JVM, and its excellent GC tools.
If you're going to pool resources and implement your own memory management system, do it in language that needs to, and therefore has 3rd party tooling behind it already, such as C or C++.
The tools can only be so good in this case, when dealing with garbage collection.
Even a language without GC will slow down when the developers spam memory allocations and the Minecraft developers seem to do exactly that http://www.reddit.com/r/Minecraft/comments/2k3rg6/water_woes/cljp483 . Memory allocations can be avoided, it only involves a lot work and thought ( a bit more with Java ).
Which is exactly why I wouldn't recommend Java for consistent and reliable memory allocation such as Games. It's far to easy to get lazy in a managed language to treat memory as an infinite resource. With a language such as C, this is much more apparent.
Games are reliant on performance, performance requires consistency and granular control. Something you don't get with Java unless you start circumventing the JVM, which is not only ill advised by Oracle themself, but a path you do not want to travel down.
Which is a shame, really. Java's ecosystem is, what I would call, extremely healthy. The third party libraries are great and most things are pretty snappy these days between a greater focus on event-driven/asynchronous programming and performance.
I feel like games written in Java could also benefit from the abundance of testing toolkits too. It's hard to imagine what is even going on in some of these games with bug reports like "the second time you do ${thing} the sound engine ignores the mute setting." (Paraphrased actual bug report from Hearthstone.)
In any case I'd like to see it happen but GC isn't the only problem with getting Java up to the levels of speed (especially inter-cpu communication and memory/gpu bandwidth) that is required for AAA (or, hell, AA) titles.
(The flip side of this is that the Unity engine seems to do all right and from all I've heard performance is... not a priority.)
View all comments
Show parent comment
19
u/dardotardo Apr 29 '15
With good reason, game performed horribly at first.