13 ms·
Understanding Minecraft Performance (2011)
- zimpenfish 6y agoJava still seems to be the main sticking point - Bedrock (C++) seems to have much higher performance these days. (Although, intriguingly, Apple Silicon runs Minecraft under Rosetta 2 much more efficiently than the i9 I was using a month ago - no fan noise, no burnt legs, lasts hours on battery, stable 60fps - despite using higher settings and without quitting everything else first. Roll on an Apple Silicon JVM.)
- danielheath 6y agoA rewrite with performance as the primary motivation is likely to be faster in general, but yes: avoiding garbage collection pauses is a substantial advantage for a video game.
- karianna 6y agoHowdy, I’m the Group engineering manager for Java at Microsoft (yep we now do Java!). Our group is working on minecraft’s perf (starting with server) so expect a steady rate of improvement over the 2021
- Aulig 6y agoThat's good to know, as server performance has been miserable since 1.13. Also good to hear that Java edition won't be slowly faded out :)
- chairmanwow1 6y agoThis is actually really exciting to know :)
- JoyrexJ9 6y agoThe Java client is still in development?
- pityJuke 6y agoYes, Java is still important. The vast majority of user-generated content on servers is pretty much Java only. I also believe Java is still the authoritative version of the game (i.e. things come to Java first, before eventually coming out to Bedrock) - the lead game designer for Minecraft is a Java dev.
- schmorptron 6y agoThat's really good news. Thanks for still supporting the moddable java edition!
- karianna 6y agoTo be clear to everyone. Not commenting or promising on the future product direction of the Java server or Java edition (my group doesn't own the product or product direction in any way shape or form). There's just some stuff we can look at now to improve the status quo since a bunch of my team are also fans of the game :-)
- willis936 6y agoIs there any chance of an official modding API to either Java or Bedrock? I know this is not the place to make such promises or announcements, but I’d be remiss not to ask.
- deleted 6y ago[deleted]
- tntguy 6y agoWow thats great! could you also recode tnt physics similar to how they were in version 1.7.10 so that tnt cannons can work again?
- hbrombeer 6y agois there a way to get you up with Information or a talk about issues within the java server?
- tntguy 6y agoyes you can add me on discord Lugburz#5061
- deleted 6y ago[deleted]
- gameswithgo 6y agolack of value types is also a sticking point, which the early code worked around but evolved to do less and less so. imagine arrays of references to 3d vectors each of which is an object on the heap, instead of inline, etc
- The_rationalist 6y agoValue types are coming soon: https://openjdk.java.net/jeps/390 https://openjdk.java.net/jeps/390 Probably supported as of Java 17
- jdmichal 6y agoI've been hearing about value types in Java Coming Soon(tm) for like what, 5 years now? I'll believe it when I finally see it.
- pjmlp 6y agoIt took C++ 10 years to get concepts and modules into the standard, and experience shows 5 more until all bugs are sorted out. Probably 10 more for static reflection, executors and networking. Good engineering takes time.
- jdmichal 6y agoSure, but then stop advertising the damn thing. That's what I'm reacting to, the advertising. I'm fine with it taking as long as it needs to take. But I've been hearing about it for so long that all excitement for it is completely gone. When it actually drops, it will be met with the word "finally" instead of "awesome".
- The_rationalist 6y agoThe JEP 390 that I linked should make you update your beliefs. Contrary to years ago, the value type implementation has matured so much that in a few months every Java program will have to be forward compatible with value types (otherwise they'll get warnings) We are long past the state of just talking about it, now it's being quickly incrementally added
- willis936 6y agoIt’s surprising GC isn’t mentioned once. That was always the thing to fight for decent UX in modded minecraft. Leaky mods could lead to (what this article refers to as) lag spikes as long as 40 seconds when the GC triggered (once a minute with tuned GC settings).
- pjmlp 6y agoBecause most likely it was more an issue of who wrote them than the quality of the GC.
- willis936 6y agoThe presence of a GC is an enabler for bad coding. If the code wasn’t running in a VM then you couldn’t play a mod with a memory leak that bad. It would just crash, as it should.
- pjmlp 6y agoMemory corruption exploitation in C is a proof that no, it doesn't crash, only if you get lucky.
- willis936 6y agoAllocating memory when there is no available addresses does not reliably result in a seg fault in C?
- pjmlp 6y agoNot at, depends on the OS. It should return NULL, but not necessarly depending on the OS. For example in Linux it will always return a pointer to memory that is yet to be allocated, it is when you touch the memory for the first time that Linux via the MMU trap, then goes around and actually makes the memory segment available, by then it is too late if the system is running low on memory. https://man7.org/linux/man-pages/man3/malloc.3.html https://man7.org/linux/man-pages/man3/malloc.3.html That is why there is such a thing as OOM daemon on Linux. Secondly, memory leaks like those caused by double free lead to the corruption of the memory allocator, thus whatever happens depends pretty much on the implementation being used.
- pjmlp 6y agoEven in C++ you have to take care with allocation patterns and what data structures to use. If more care was taken in such areas it would also perform somehow better. Hopefully when Java joins the world of languages with automatic memory management with support for value types, these kind of issues start being only a matter of careless programming. Java 16 will bring the experimental API for native memory by the way.
- chairmanwow1 6y agoRedstone circuits in Minecraft are honestly one of the most fun things I've played in a long, long time. When I first played the game as a HS-er I didn't really understand enough about boolean logic or computation to understand it. During shelter-in-place I took another look at it and was totally sucked in. I absolutely love the cool thing the community has come up with. I really like the creative challenge of coming up with new designs for machines that automate away the problems that you have in the game. Honestly, it's a real shame the devs don't encourage more automation directly. The real reason I stopped playing in the first place is that it quickly just turned into tedious _work_ to collect resources. Another thought I had was that the spatial nature of the thinking that you are doing when you are constructing redstone circuits works really well for my brain. I wish I could leverage that side of my brain when doing programming work. I'm able to keep a lot more in my working memory when I can reference a component by it's location relative to everything else. It's hard to describe, but I really quite liked it.
- Thorentis 6y agoThere were some fantastic mods back in the day that focussed more on the automation side. Can't remember what they are called now (Tekkit maybe?). Gave Minecraft a very Factorio feel. Huge mining drills, assembly lines, conveyor belts, drones, robots, computers. Immense fun.
- comp500 6y agoThey're still around! Well, Tekkit has stopped developing modpacks, but plenty of mods are still being updated, most of which are available on Curseforge. For a Factorio-like feel I'd say Create, Immersive Engineering and the modpack Omnifactory are great.
- willis936 6y agoIt’s more accurate to say Factorio has a very “modded minecraft” feel, since that was partial inspiration for the devs. Automation games. Mindustry is good too. Far and away the mod I have spent more time playing than any other video game is gregtech. I’ve moved on, but I was as far as balancing recipes for all mods in a private kitchen sink pack before I stopped.
- comp500 6y agoAs alternatives to Optifine (which doesn't have many actual optimisations now, as most of the original improvements were implemented in the vanilla game https://gist.github.com/jellysquid3/e46882e37907dfbb3d03d26f589b1c6a https://gist.github.com/jellysquid3/e46882e37907dfbb3d03d26f...) the Sodium, Lithium and Phosphor optimisation mods are much faster and are fully open source. Sodium in particular has some detailed javadocs for the primary optimisations, if you want to see how it works: https://github.com/jellysquid3/sodium-fabric/blob/1.16.x/dev/src/main/java/me/jellysquid/mods/sodium/client/render/chunk/backends/gl43/GL43ChunkRenderBackend.java https://github.com/jellysquid3/sodium-fabric/blob/1.16.x/dev...