5 ms·
Yes, you are correct. Java is the one that's exclusively on desktop and it has "Java" added to the name Bedrock its just "Minecraft" and includes all the other
by Snacklive 3y ago
Yes, you are correct.
Java is the one that's exclusively on desktop and it has "Java" added to the name
Bedrock its just "Minecraft" and includes all the other platforms
- wg0 3y agoAgain being a noob on Minecraft, how does Java work for a game like that? I mean performance wise? Whereas traditionally people would write such a thing in some typical game engine.
- fifticon 3y agoPerformancewise java actually isn't bad. In the middle nineties, java would feel slow compared to e.g. C, but we've come a long way since. Some basic tricks are sticking to fixed arrays, and avoiding angering the garbage collector by repeatedly allocating and deallocating stuff. Dave's garage in recent years did an involved 'which languages are fastest' benchmark, where java was, I think, number 5? It was beaten by Zig, Rust, C and C++, and the numbers of java and C++ were quite similar. (Of course such a test is not generally valid, anything can be optimized to be 'the fastest ever', if there are no limitations on what goes. In that test, they used a prime number sieve). Usually, Minecraft is sped up by using more clever algorithms(OptiFine), not switching to different languages. For how Minecraft has performed, in every sense (including on hand-me-down laptops of 6-year olds), java has served well. Of course, using C or C++ might have sped it up by a factor of x2-x5, but it has not been a pain point, to my knowledge.
- zimpenfish 3y ago> avoiding angering the garbage collector by repeatedly allocating and deallocating stuff One of the places where I believe the Minecraft code falls down hard - it allocates and deallocates tens (maybe hundreds) of MB per second. Basically the kind of "first draft you'd write before optimising things" code. Things like OptiFine help out by (IIRC) making certain things mutable and cutting down the alloc/reallocs. > Performancewise java actually isn't bad. Yeah, I should probably clarify that I don't think Java itself is bad but the way Minecraft uses Java and how Microsoft have put basically zero effort into optimising things (because their cash cow - Bedrock - is written in C++) since they've owned it. When mods like OptiFine and Sodium that are monkey-patching the bytecode can improve things greatly, it's a strong sign the base is not optimised.