289 points · by tuananh · 9mo ago · 171 comments
The main thread is often the limiting factor in minecraft. Minecraft just can't go as fast as the GPU could render the scene and even with quite a lot of shaders things are CPU bottlenecked. Hopefully this changes with time as modding minecraft could certainly do with a bit more CPU time free.
Minecraft's non-world entities like players and enemies aren't voxels at any level though, those are directly authored as low poly meshes.
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)...
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 Java Edition is so popular, and that includes shaders specifically. This is already going to cause chaos in the modding world as it is, no need to compound that by making shader mods that much more burdensome to maintain.
Funny to contrast with Bedrock edition, for which they paid for FMOD Studio to cover the audio features of those two (and more).
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
For me the biggest obstacle would be the weird build system the project insists on using.
But you can easily make Vulkan run on macOS. Not sure what would be the reason to use DX12 in the new project today given free choice of technology, especially when team comes from OpenGL.
I'm making a joke, but it's also true.
I always appreciated that MC would run on virtually any hardware, especially as a kid without access to anything nice.
I think this means you'll be able to continue using Minecraft with OpenGL.
> Once we’re happy with the performance and stability of Vulkan across devices we will remove the OpenGL implementation.
So not for long.
and of course all the previous minecraft versions will continue working on opengl :p
I installed Chrouton which let you switch between chromeOS and a full ubuntu chroot, which was the best of both worlds as you could do the optimized browsing on ChromeOS and development tasks on the chroot.
After it fell out of ChromeOS favor, I just installed arch on it and called it a day. It's my go-to conference laptop because it's still so conveniently small, light, and 12 years on the battery still gets 6 hours.
Apple apparently got very pissed on how Khronos took care of OpenCL.
Then Sony and Nintendo couldn't care less about Khronos, people keep forgetting about game consoles when discussing the portability of Khronos APIs, or ignoring the fact that in reality they aren't really that portable due to the extension spaghetti.
I wouldn't be so sure about Nintendo. From time to time you see them pop up as contributors for some extensions.
https://github.com/search?q=repo%3AKhronosGroup%2FVulkan-Doc...
You don't. Ever since 1.17 you have been able to build GL shaders directly into resource packs. Resource packs don't require any complex loaders and don't pose a malware risk. To install them you can either drag-and-drop them as .zips directly into the resource pack menu, or a server/world can be configured to prompt the installation of a resource pack. These resource pack shaders are not quite as flexible as Aperture, Iris, or Optifine shaders, but they are fairly close in functionality.
I'm curious if they will carry over this functionality for Vulkan shaders embedded into resource packs. I suspect they may not, which is understandable given how it can be used to break the game's functionality much worse than an ordinary resource pack can (not full RCE, though)
This sounds very cool, I never knew this. Could you give me an example of such pack?
This one is particularly interesting because it integrates block data in the rendered world along with some server-side augmented data to render a minimap in a vanilla client: https://github.com/JNNGL/VanillaMinimaps
This thread is quite weird to me. People are massively overstating how important modding is and understating the strength of vanilla Java. Minecraft is not Skyrim
Speedrunning, anarchy servers, parkour, technical farming, server economy destruction videos and other primarily vanilla Java content forms are as popular as ever or more. Alongside the newer content creators, Hermitcraft is still growing somehow, as is Etho. Besides anarchy a little bit, none of this is reliant on modding
There are significant updates every year and many people, including me, install them every time they come out and play them in vanilla.
This makes sense. I guess I’m a bit surprised they were still OpenGL anywhere.
I never really got into Minecraft though, so I can’t pretend I know much about its current state. I didn’t even realize there was a non-Java version for desktops.
Probably the most underappreciated great feature in recent Java releases.
IIRC Minecraft is still using entirely JNI and no FFM yet. That will probably start to change in the near future, though. Some modders have already been replacing their own natives with FFM versions.
Slightly off-topic too, but I would love for Minecraft Java Edition to have a safer and more robust modding API. For the past decade modding efforts have mostly just been patching on top of a reverse engineering mod framework which exposes some of the game to mods. Factorio is practically the Platonic Ideal in this regard with its Lua sandboxing and restricted API. This is a huge security and stability issue, but Microsoft have no real incentive to fix it.
https://learn.microsoft.com/en-us/minecraft/creator/scriptap...
Vulkan gives all the tools to avoid any "lag spikes" from shader compiling. In fact, causing them is much more difficult than OpenGL where they could happen in surprising places (and only on certain hardware).
The issue is two fold: 1. Some engines produce a lot of shader permutations. Some AAA titles can have 60000 different shaders compiled. 2. Some GPU rasterizer states (such as color blending) are implemented as shader epilogues.
In Vulkan 1.0 almost all of the pipeline state had to be pre-baked into a pipeline state object compiled ahead of time. This lead to a "shader permutation explosion" where different states need different pipelines.
This requires the game engine to either a) compile all the pipeline combinations ahead of time (slow loading time) or b) compile them as needed (lag spikes).
The core issue for this was solved years ago and now most of the pipeline states can be added to the command buffers ("dynamic states"). This solves the permutation explosion. But at the same time it opens the door for issue 2: some states (blending in particular) can cause a state-based recompile (like ye olde OpenGL days) at runtime.
The only solution to the second problem is not to use the dynamic states that trigger recompiling. That's basically only blending as far as I know. You can't even have dynamic blend state on all GPUs.
For maximum developer flexibility there's the shader object extension that allows mixing and matching shaders and pipeline states any way you want. This will cause state based recompiles at unpredictable times but it's an opt-in feature and easy to avoid if lag spikes are not wanted.
tl;dr: shader recompilation is easy to avoid in Vulkan but porting legacy engine code or art content may take you off the happy path.
For Vulkan you already ship "pre-compiled" shaders in SPIR-V form. The SPIR-V needs to be compiled to GPU ISA before it can run.
You can't, in general, pre-compile the SPIR-V to GPU ISA because you don't know the target device you're running on until the app launches. You would have to precompile ISA for every GPU you ever plan to run on, for every platform, for every driver version they've ever released that you will run on. Also you need to know when new hardware and drivers come out and have pre-compiled ISA ready for them.
Steam tries to do this. They store pre-compiled ISA tagged with the GPU+Driver+Platform, then ship it to you. Kinda works if they have the shaders for a game compiled for your GPU/Driver/Platform. In reality your cache hit rate will be spotty and plenty of people are going to stutter.
OpenGL/DirectX11 still has this problem too, but it's all hidden in the driver. Drivers would do a lot of heroics to hide compilation stutter. They'd still often fail though and developers had no way to really manage it out outside of some truly disgusting hacks.
Is there a source for this? I don't remember any language to suggest Java Edition would eventually be replaced when they announced Windows 10 Edition. They've always indicated that they intend to keep maintaining the Java Edition, with parity in the core game. The messaging here has never changed, as far as I'm aware.
Bedrock is more performant and more portable across platforms (e.g. on consoles where you couldn't mod anyways).
As for feature parity, there are mods backporting modern features back to 1.7.10.
Java is also portable to all the consoles, its just Microsoft did use that as an argument to try to kill the Java Edition. Nobody prevented Microsoft from adding bedrock like modding to Java Edition.
The only thing that needs to happen is the one single stable mod API for Minecraft Java Edition. The incompatibility between Forge, NeoForge, Fabric, etc. is terrible, but from what I know about some of the folks involved this won't happen as they cannot constructively discuss the matters.
Much of the cashflow is from kids watching a YouTuber doing something in Java Minecraft and attempting it themselves in bedrock, which is why feature parity is the only thing they’re really working on anymore.
Bedrock is aimed at kids and they've never made any real effort to supplant Java with it. It's just a very effective way of hitting different target markets
They have no need to supplant Java, nor any desire to (and all their marketing materials and screenshots are usually Java anyway).
Microsoft logically wants to keep sales from both.
They better make use of Zink/Angle or similar approaches.
Where does it say that? Why not use MoltenVK?
There is the non-Java version (Bedrock), but that’s not nearly as extensible.
Considering the vast majority of mods are just adding some items or creatures, they don’t need to worry. This won’t be more than the regular API changes in between versions that they’re already used to, unless it’s a more graphics heavy thing like a shader mod.
Also, even with shaders, it’s fairly straight forward to port a shader from OpenGL to Vulkan (for the most part Vulkan just gives more flexibility in that regard). The stuff around it is the hard part.
There's a whole community that plays on private servers and uses extensions for stuff like access control, new game mechanics (which doesn't mean new shaders but new behaviors in game) etc.
The native windows version is not moddable as described above. And probably will never be because MS wants you to rent "servers" from them.
So most "serious" minecraft players ignore bedrock.
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.
There’s a native version called bedrock
https://en.wikipedia.org/wiki/Microsoft_Java_Virtual_Machine
https://cdn.graph.office.net/prod/media/java/how-microsoft-a...
The dubious Mojang account migration. Their lack of support for kids who got their accounts phished recently. Migrating to Vulkan breaking old hardware.
Sad story, but it was to be expected MS bought Mojang.
- Vulkan requirement raises the baseline to 2016-2017 hardware. 2017 was 9 years ago.
- They're not cutting off OpenGL right away, according to the announcement they will release 26.1 as OpenGL-only, and then at least one more full release where you can choose between the two options. Based on their usual schedule it will probably be at least a year from now before they cut off OpenGL support, if not longer.
- All previous versions of the game are still available to play, including the oldest versions that run on Java 6, x86-32, OpenGL 1.2, Debian 5, Windows XP. Can still do multiplayer sessions on versions released in mid 2010.
- The community can fill in the gaps in multiple ways. Translation layers are available to connect to newer servers with older clients (ViaVersion), as well as with Bedrock clients (GeyserMC). Mods will almost certainly be released to reimplement the rendering engine in OpenGL or GLES. Renewed interest may mean OpenGL 2.0 compatibility mods could come back. Also, Mojang recently liberated Minecraft from variable name obfuscation, so modding will be easier than ever before.
- As a last resort, software rendering for Vulkan has gotten relatively mature, though obviously this means single digit FPS in many scenarios
Java Edition has taken an extremely conservative path, practically nothing else in the gaming industry held on to legacy hardware this long.
And reimplementing the rendering engine for a different graphics API isn't even unprecedented, because there's a mod (VulkanMod) that reimplements the rendering engine for Vulkan already!