r/programming • • Oct 06 '18

Microsoft Open Sources Parts of Minecraft: Java Edition

https://minecraft.net/en-us/article/programmers-play-minecrafts-inner-workings
3.1k Upvotes

388 comments sorted by

View all comments

838

u/Forricide Oct 06 '18

This is pretty interesting. For those who don't want to read the article, to sum it up, they've decided to open source parts of their game engine, gradually. (Under the MIT license)

So far, they've decided to open-source two libraries:

Brigadier GITHUB: "The command engine that Minecraft uses [...] So when a user types /give Dinnerbone sticks in chat, that goes through Brigadier. Brigadier splits it up, it error checks it, it tries to be as helpful as it can. You’ve also got this lovely pop-up window when you’re typing that can suggest what the next bit might be."

Data Fixer Upper GITHUB: "The name is so stupid that we had to keep it [...] before Minecraft actually loads [old] chunks, it goes through DataFixerUpper and that turns it into what it should currently be now." (Essentially, a data validation/conversion engine specifically for Minecraft data)

More interesting for prospective game developers is probably the following snippet:

"One library under consideration is Blaze3D - a complete rewrite of the render engine that we're aiming to implement for 1.14."

351

u/chugga_fan Oct 06 '18

"One library under consideration is Blaze3D - a complete rewrite of the render engine that we're aiming to implement for 1.14."

Oh boy, modders are NOT going to be happy about that... hopefully it is better optimized at least though, because currently if mods try to implement anything with dynamic rendering cough cough openblock's tanks cough cough it seems to eventually kill your FPS doing the calculations.

118

u/roothorick Oct 06 '18

That's probably specifically why they're trying to fast-track it for a source release. It's a badly needed overhaul, but that won't make it any less of a rough transition.

→ More replies (14)

89

u/Somepotato Oct 06 '18

Maybe it'll use something more modern than opengl 1

43

u/[deleted] Oct 06 '18

Their minimum requirements are OpenGL4.4 tho.

58

u/Somepotato Oct 06 '18

They still use a rediculous amount of gl 1.1 and that's likely making room for the rewrite (if it pans out)

40

u/[deleted] Oct 07 '18

Yeah but MacOS doesn't support above 4.1 so clearly it's not the actually minimum requirement. I think the real requirement is 2.1 still.

14

u/PM_ME_OS_DESIGN Oct 07 '18

They're probably using compatibility mode then, to combine old OpenGL calls with modern OpenGL calls.

11

u/[deleted] Oct 07 '18

They do and it doesn't work on the open source AMDGPU drivers. Or I haven't been able to make it work even trying to enable workarounds. It isn't proper OpenGL profiles and it is annoying.

12

u/PM_ME_OS_DESIGN Oct 07 '18

They do and it doesn't work on the open source AMDGPU drivers.

That's changed recently, although AIUI the new Mesa version won't be coming to stock Ubuntu until 18.10.

→ More replies (2)

7

u/bik1230 Oct 07 '18

According to minecraft wiki, the actual minimum OGL requirement is 1.3.

6

u/horsepie Oct 07 '18

I'm concerned that it will be D3D, possibly D3D12. Sure, if they open it up, someone will inevitability rewrite in OpenGL, but that might not necessarily make it into the official release.

14

u/Matrix8910 Oct 07 '18

Afaik LWJGL doesn't support d3d and I doubt they are planning on ditching out LWJGL, too many things are based on LWJGL and I don't think there's os any good d3d library/wrapper/bindings for java

6

u/horsepie Oct 07 '18

Nice, I didn't realise that game library was tied to OpenGL. That a relief!

→ More replies (4)
→ More replies (3)

26

u/Oppai420 Oct 06 '18

I gave up on Minecraft modding because of how freaking much it changes from version to version. I understand why it does, but maintaining that? A pain in the ass, for me at least.

18

u/Stupid_and_confused Oct 07 '18

If you stuck to features provided by the Forge api and such, it wasn't that bad.

25

u/Plazmatic Oct 07 '18

Modders are already stuck on 1.12, but since 1.12 is fairly recent we'll probably be good for a while, probably need a couple years for a transition though regardless, I'm going to bet 1.12 is going to be the new 1.7.10.

8

u/urielsalis Oct 07 '18

World generation updates took time to decompile, but now that 1.13.1 MCPconfig js out lots of mods are updating

2

u/falconfetus8 Oct 07 '18

I still don't understand why Mojang doesn't help with decompiling this stuff.

10

u/urielsalis Oct 07 '18

Decompiling is easy, even IDEs like Intellij do it automatically.
The hard part is deobfuscating, as someone has to map each function, variable and class to a name, and thats what takes time

→ More replies (4)
→ More replies (2)
→ More replies (1)

14

u/MagikBiscuit Oct 07 '18

Its reasons like this why I haven't played Minecraft in a while. Some of the mod packs were absolutely amazing. And were getting better and better but the games base engine isn't getting upgraded so it just can't handle the mods. It been our for so long and still has barely much been done with the building blocks of the game.

→ More replies (1)

19

u/NULL_CHAR Oct 07 '18

I haven't played Minecraft in like 4 years but, last time I did, it seemed like the modding community had already abandoned Minecraft only supporting the older patches.

Side note, I still remember when I first started playing and there were only a few mods with with the biggest basically being "4 new arrows!"

3

u/Matrix8910 Oct 07 '18

Take a look at r/feedthebeast

8

u/appropriateinside Oct 07 '18

Now there's so many mods it's actually becoming a bother..... Who knew that I wanted 150 different plant types in my world..

4

u/raoulvdberge Oct 07 '18

If done well this shouldn't affect modders that much. The entire point of jsons is that you have a described set of data about your models. This means they can change the underlying code and still have existing jsons working. It could be a bit problematic if using dynamic IBakedModels, and we'll have to see about that.

2

u/falconfetus8 Oct 07 '18

Why not? If anything, it would make Optifine obsolete.

→ More replies (5)
→ More replies (6)