4 ms·
The "Java is bad for games" mindset is in part just historical bias. Performance and GC are thrown around as shallow excuses for comparing idiomatic Java with g
by mooman219 6y ago
The "Java is bad for games" mindset is in part just historical bias. Performance and GC are thrown around as shallow excuses for comparing idiomatic Java with game design C++. Actually applying methods to reduce memory pressure like using arenas, and accepting vectors to mutate instead of creating new ones solve most of the GC penalty you paid for not having to think about it while prototyping. Large servers in java minecraft patch the server to do just that, and they operate well. I think the biggest barrier for Java in Games is the stigma and lack of resources relative to C++.
- smabie 6y agoYeah, of course Java can make games. Hell, even some high frequency trading shops are using Java. But the amount of effort you have to put in to twist a language and ecosystem that is practically designed around frequent allocation is just not worth it. Like, if you're writing zero allocation Scala or Java you're going to be writing C/C++ in the first place. Might as well just use C/C++ instead of fighting the ecosystem tooth and nail.
- iamcreasy 6y ago> But the amount of effort you have to put in to twist a language and ecosystem that is practically designed around frequent allocation is just not worth it. Do you an example in mind? Unity3D uses C# which is a garbage collected language.
- smabie 6y agoAnd as anyone who as played Unity games would attest to, the performance is terrible. There's a reason why UE is much more popular than Unity for triple-A games. Take Escape From Tarkov, an FPS that tries to be a AAA game and uses Unity. The performance problems that game has is frankly staggering.
- nix23 6y agoThat's so true, you really can 'feel' Unity...it's mushy movement.
- deleted 6y ago[deleted]
- iamcreasy 6y agoBut the shear volume of successful games built by Unity suggests that the extra work comes with a GC'ed language is worth it.
- smabie 6y agoI mean, I don't think anyone is saying languages with GC are bad for a wide genre of games. They just are inappropriate for the most cutting edge, performance intensive games. Unity is a lot easier to get started with than UE4, so I understand the popularity. But for some games, the player can really tell how inappropriate the engine is. You can feel the GC churning away: poor performance, high dispersion of fps, frequent stuttering, etc. While any game using any engine could have these problems, it's especially prominent in unity games.