Live data from Hacker News

Minecraft Java is switching from OpenGL to Vulkan

gamingonlinux.com

41–50 of 177 posts

Re: Minecraft Java is switching from OpenGL to Vulkan

#41

Not a bad choice... since Minecraft Java edition only supports desktops, they don't have to deal with the abysmal Vulkan drivers on mobile. Though I thought a company large as Microsoft would have the resources to build a cross-platform RHI with the most stable API available for each platform (DX12 for Windows and Metal for macOS)...

They use bgfx for bedrock edition. https://github.com/bkaradzic/bgfx https://www.minecraft.net/en-us/attribution

This is such a gold mine project! thanks for sharing it.

I suppose, if someone in future might want to create their own godot-alternative. Why not just use bgfx with the language bindings instead.

I Love Godot from my time tinkering with it but one of the reasons why Godot is so hopeful in future compared to other engines is imo the fact that they support many many platforms.

I have seen some blogposts on HN where someone used godot to prototype an android GUI application (and not a game) and how the whole process actually makes sense when you think about where they talked about it in the blog post.

Actually there were discussions about even integrating bgfx into raylib (the goat) but looks like that its not getting integrated but it was interesting to read the discussion and maybe anyone more experienced than me could even contribute to the discussion below

https://github.com/raysan5/raylib/discussions/1699

Re: Minecraft Java is switching from OpenGL to Vulkan

#42

I hope they have a solution to the notorious Vulkan shader compilation lag spikes.

I don't think Minecraft's renderer will be PSO-heavy enough to have stuttering issues. It's not a state-of-the-art compute-driven renderer that supports artist-driven workflows with custom materials and shaders... it's just a voxel renderer with very primitive lighting.

And by voxels you mean triangles

Re: Minecraft Java is switching from OpenGL to Vulkan

#44
post #9

I'm frankly shocked microsoft has a java implementation. I thought they were the type of organization to pretend it didn't exist!

Java is the original version from Mojang/Notch. There’s always been enough of a community that killing it off to move away from Java would break so many extensions and servers would see an active revolt. There is the non-Java version (Bedrock), but that’s not nearly as extensible.

Switching to vulkan breaks all the extensions too

Re: Minecraft Java is switching from OpenGL to Vulkan

#45
post #43

> For the macOS side of things, they'll use a translation layer since Apple don't support Vulkan directly (they made their own API with Metal) Where does it say that? Why not use MoltenVK?

I think MoltenVK probably is the translation layer they're using.

Re: Minecraft Java is switching from OpenGL to Vulkan

#46
post #13

Earlier quoted context omitted.

Ah, I had misread "minecraft" as "microsoft". I wasn't aware minecraft java was a thing. Crazy they have their own java implementation!

Not a Java implementation, but the original game was written in Java. Later, Microsoft bought Minecraft and rewrote it (Bedrock edition) which runs on Xbox, tablets, etc. But, the community writes mods in Java. Now both exist and get roughly the same feature set now, but the Java version remains popular given the vast variety of mods and servers.

As I recall the C++ reimplementation of Minecraft predates the Microsoft sale. Unless they did a complete rewrite I don't know about, Bedrock is distantly based on the old mobile/console version of Minecraft.

Re: Minecraft Java is switching from OpenGL to Vulkan

#47

Earlier quoted context omitted.

> It’s the Java version of the game, not a game version of Java. This would be termed "Java Minecraft", not "Minecraft Java"

No, the game's Java version's official title post-Microsoft acquisition of Mojang is Minecraft: Java Edition.

They have renamed both product lines, Bedrock edition many times.

Re: Minecraft Java is switching from OpenGL to Vulkan

#48

Earlier quoted context omitted.

Yes, many games do that too. Depending on how many shaders the game uses and how fast the user's CPU is an exhaustive pre-compile could take half an hour or more. But in reality the exhaustive pre-compile will compile way more than will be used by any given game session (on average) and waste lots of time. Also you would have to recompile every time the user upgraded their driver version or changed hardware. And you'…

I don't think this is as much of an issue as you are making it out to be. I have my Steam Deck on the main branch release which seems to exclude it from downloading precompiled shaders. When a game updates it has to compile the shaders first, but even on a big game this does not take an unreasonable amount of time. Less time than it takes for game updates to download at least. Steam could improve the experience here…

I remember Star Wars Jedi Survivor had a 5-6 minute shader pre-compile on my 5950X. I heard of people well into the 30 minute mark on lower core count machines. Battlefield 6 was a few minutes on my 9950X, higher again on lower core count CPUs.

Really depends on the game.

There's no easy way around this problem. It never came up as much in the OpenGL/D3D11 era because we didn't make as many shaders back then. Shader graphs and letting artists author shaders really opened pandoras box on this problem, but OpenGL was already on its way out by the time these techniques were proliferating so Vulkan gets lumped in as the cause.

Re: Minecraft Java is switching from OpenGL to Vulkan

#49
post #16

Not a bad choice... since Minecraft Java edition only supports desktops, they don't have to deal with the abysmal Vulkan drivers on mobile. Though I thought a company large as Microsoft would have the resources to build a cross-platform RHI with the most stable API available for each platform (DX12 for Windows and Metal for macOS)...

A company as large as Microsoft has resources to do a lot of things, but you’re not borrowing resources from the Office team to help on this project. The relevant measurement is the resources Mojang has as a studio. And I expect the decision here is that they don’t want to commit to the long term maintenance of three renderer implementations on the Java side. Another concern is that modding is a major part of why Jav…

TBH Mojang should have the resources to do that on his own, Minecraft is the best selling game of all times btw.

Re: Minecraft Java is switching from OpenGL to Vulkan

#50

Earlier quoted context omitted.

Support for DX12 under Proton in linux is incredibly good. Some games actually run faster under DX12 in Proton than the native versions do.

I don't think it's faster than a windows game running Vulkan, though, is it? Like, if you benchmarked a game that has native DX12 and Vulkan modes (such as Wolfenstein: The New Colossus, I believe), it will probably have higher FPS in Vulkan mode, right?

Well our game runs faster in DX12 under Proton than Vulkan under Proton.

Of course since Proton uses Vulkan to implement DX12, it means that our Vulkan implementation is simply worse than the one that Valve created to emulate DX12.

I'm sure it's possible to improve that, but it implies that there way to get the best performance out of Vulkan is less obvious than the way to get it out of DX12.

Post reply on HN