Live data from Hacker News

Minecraft: Java Edition now uses SDL3

minecraft.net

131–140 of 285 posts

Re: Minecraft: Java Edition now uses SDL3

#132
post #74

Earlier quoted context omitted.

And less capable as one is limited by the official extension points, instead of the anything goes with bytecode manipulation.

I assume you mean bedrock edition, but you did not specify.

Yes, the inferior edition.

Re: Minecraft: Java Edition now uses SDL3

#133

Earlier quoted context omitted.

My main advice, ignore all advice online about JVM tuning minecraft. It's dated and often just wrong. The best thing you can do is run on the latest JVM, set your max memory as high as you can tolerate, and use ZGC. That's it. The JVM tuning guides for minecraft will have you switching and toggling every JVM flag under the sun with extremely dubious "evidence" of the payout for the flags they switch. In some cases, t…

Do not set the heap size to more than 8GiB, even if using heavy modpacks. Anything above 8GiB actually makes the game run worse, unless you have tons of players, because of GC lag.

8 GB is simply not enough for most modpacks, at least the 200+ mods one. I know, I've tried, although it was years ago. You run at consistently 95% GC usage and get constant, very heavy, collections because of it. Like every second you get lag spikes due to GC pressure. And because of the usage these look to be full collections, which are stop-the-world last I checked.

This was ~5 years ago, so I'm sure it's gotten better. But not that much better 8gb would cut it, either client or server side.

Re: Minecraft: Java Edition now uses SDL3

#134
post #81

Earlier quoted context omitted.

Your suspicion is that they're going to discontinue Bedrock and replace the iOS and Android versions with Java? Even though iOS doesn't even allow Java with JIT?

Dunno. Apple makes exceptions for big companies and might do so for something as big as Minecraft. Also, SDL3 supports far more platforms https://wiki.libsdl.org/SDL3/README-platforms Now they can release a Java edition even for PlayStation and Xbox. At least porting to SDL3 opens the door to consoles and mobiles if they want to do so.

If both sides are willing to do that, why didn't they do that the first time instead of creating Minecraft PE?

Re: Minecraft: Java Edition now uses SDL3

#135

Earlier quoted context omitted.

My main advice, ignore all advice online about JVM tuning minecraft. It's dated and often just wrong. The best thing you can do is run on the latest JVM, set your max memory as high as you can tolerate, and use ZGC. That's it. The JVM tuning guides for minecraft will have you switching and toggling every JVM flag under the sun with extremely dubious "evidence" of the payout for the flags they switch. In some cases, t…

Do not set the heap size to more than 8GiB, even if using heavy modpacks. Anything above 8GiB actually makes the game run worse, unless you have tons of players, because of GC lag.

It depends on the GC, with ZGC no. Particularly if you enable generational mode.

For other GCs like G1 and the parallel collector, when new gen is filled up the GC pauses the application in order to run a minor collection. For G1, major collections are ran in the background until the heap fully fills up. When that happens, the GC triggers stop the world GC.

A smaller heap size would cause those pauses to be more frequent but because the heap is smaller it means that ultimately the pauses will be limited in length.

ZGC is different. Without generational mode, ZGC is collecting the entire heap every time with it, ZGC will do the young old collections.

When a collection is triggered, ZGC flips a field to indicate a collection in progress, that flip is the only pause for the application under zgc (except the case that the heap fully fills) it typically finishes in microseconds. Once collection starts, the ZGC collector threads and the in progress application are running collections. The size of the heap really doesn't change much other than the background collection could last longer (slowing down the server, but not totally stopping it from being responsive).

The payment you make with ZGC is that you do burn more CPU cycles doing collections especially while the app is running. But for a game server, that hardly matters. What matters is that the server remains responsive in a timely fashion, which ZGC enables.

Re: Minecraft: Java Edition now uses SDL3

#136

Earlier quoted context omitted.

I consider this the fault of macOS. The way macOS handles full screen makes it a nonstarter as a gaming platform even if it had a huge gaming library. Still, I’ll admit that Minecraft full screen on Mac is even worse than almost all other games.

I highly doubt that macOS fullscreen has that much higher latency than Windows fullscreen. The latency is so fine that I play Windows games over a capture card using OBS as the monitor. (The Mac has a 120Hz display though.) I like to play games like ARC Raiders using that setup. Works perfectly fine. Sure it sucks that I need Windows at all for it, but SteamOS isn't an option yet due to my 3090

I’m not talking about the latency, more of the interface surrounding it and the overall feel of it. It’s kind of hard to describe what I dislike about it.

I’m not really a fan of the way it’s a three finger swipe sideways to leave and enter the full screen either.

I’m pretty sure I have had at some point issues where putting my cursor at the top of the window erroneously shows the menu bar within certain types of games.

Not sure if I’m remembering right, it’s been a while since I’ve tried playing games on Mac.

Re: Minecraft: Java Edition now uses SDL3

#137

Earlier quoted context omitted.

My main advice, ignore all advice online about JVM tuning minecraft. It's dated and often just wrong. The best thing you can do is run on the latest JVM, set your max memory as high as you can tolerate, and use ZGC. That's it. The JVM tuning guides for minecraft will have you switching and toggling every JVM flag under the sun with extremely dubious "evidence" of the payout for the flags they switch. In some cases, t…

Do not set the heap size to more than 8GiB, even if using heavy modpacks. Anything above 8GiB actually makes the game run worse, unless you have tons of players, because of GC lag.

I would generally not call modpack that runs well on 8gb heavy

Re: Minecraft: Java Edition now uses SDL3

#138
post #16

Earlier quoted context omitted.

Delay a release? Sure. But delay a snapshot? Why? By releasing the snapshot in this state, they learn both 1) how big of a problem those known issues are (how often does entering exclusive fullscreen crash the game on Windows? They presumably have telemetry for this), and 2) if there are other, as of yet unknown issues they need to fix before release. The earlier you learn these things, the better. There hasn't ever…

Are snapshots explicitly a beta channel? Or do users get auto updates to them? Testing for bugs in prod shouldn’t be acceptable unless users expect bugs in exchange for getting latest features early in something like a beta channel

They are explicitly a beta channel, and in fact if you create a world on a snapshot you don't have an upgrade path to future releases (unless you start hacking at your world files with an NBT editor). So most of the community ignores them and waits till release.

Re: Minecraft: Java Edition now uses SDL3

#139

Earlier quoted context omitted.

Set JVM heap to half available memory. Mincraft is very much the kind of appication that benifits from filesystem cache to help with loading chunks. Also if for some reason you are setting the heap size high avoid going past 32 gb unless you tune object alignment. Allocating between 32 and 47 gb will result in an effectively smaller heap. Allocating more than 32 gb can result in performance penalties.

Wow. When I played Minecraft, 1GB was enough and 4GB was a lot. I know that since 1.8 Microsoft rewrote large parts of the engine to make them less efficient and more ivory-tower, but I didn't know it was that bad.

This was more a hasty response with modding in mind to the parent comment of "set it as high as you are comfortable with." There are limits to how high you should go. If you are running vanilla you may not need to set the heap to 50%. Anything past 50% or 32 gb isn't a great idea generally.

Re: Minecraft: Java Edition now uses SDL3

#140

Earlier quoted context omitted.

Geyser sounds very interesting especially if you know some or all players wouldn't be willing or perhaps able to play Java Minecraft and so they have to run Bedrock, but some would play Java and they'd enjoy being together. Java Minecraft is just a better toy, I'm not altogether sure it's a better game, depending on how you define game, but it's a better toy because it's so flexible. I assume Geyser can't magically d…

Aside from being more flexible they are mostly the same game. The original excuse for bedrock was that Java was slow and a native game would render much better, it was also easier to put shaders in a a native codebase. But Java edition is pretty performant nowadays and computers also got much more stronger than the game became heavier

As far as I can remember the origins of Bedrock are the original console releases which couldn't ship a JVM. So a whole new codebase was developed, and ultimately it was more performant as it had to run on 7th gen consoles.
Post reply on HN