#BlameMojang

Strikingwolf

New Member
Jul 29, 2019
3,709
-26
1
...which won't happen until the day MC is open-sourced, because from experience we know Mojang isn't doing that.
Well...yeah...But the PE guys have managed to do C++ modding...it might be workable, and then build an abstraction layer on it...
 

OnyxDarkKnight

New Member
Jul 29, 2019
33
0
1
TRAITOR! Go get the torches and pitchforks guys!
C++ 'aint that bad, you know? I worked with it in the past and it's decent. Never coded in C#, but I've seen scripts in Unity and seems to follow a bit the java rules, except when it comes to overriding. But even so, I prefer working with something I have experience. Although I'd love to learn C#. I literally have nothing against it :p
 

Strikingwolf

New Member
Jul 29, 2019
3,709
-26
1
C++ 'aint that bad, you know? I worked with it in the past and it's decent. Never coded in C#, but I've seen scripts in Unity and seems to follow a bit the java rules, except when it comes to overriding. But even so, I prefer working with something I have experience. Although I'd love to learn C#. I literally have nothing against it :p
C++ is okay, but Rust is better
 

trajing

New Member
Jul 29, 2019
3,091
-14
1
IIRC Mojang did some work to make the rendering pipeline more modern, but I'm not sure exactly what happened there.

Another change was using objects for block positions instead of integers. You'd need to create a new object and later garbage-collect it whenever you want to refer to a location, and anything that needs the XYZ coords needs an additional dereferencing operation. All of that means more work for the processor.
WHY?
What compelled them to use a special coord object rather than simply using ints? :p
 

Planetguy

New Member
Jul 29, 2019
156
0
0
WHY?
What compelled them to use a special coord object rather than simply using ints? :p
It's generally good design to keep related data in the same objects. Unfortunately Java doesn't support value types (and won't for some time) so there's a small performance penalty for each time you create one, and the penalty adds up when you need to create and garbage-collect a lot of them each frame.
 

trajing

New Member
Jul 29, 2019
3,091
-14
1
It's generally good design to keep related data in the same objects. Unfortunately Java doesn't support value types (and won't for some time) so there's a small performance penalty for each time you create one, and the penalty adds up when you need to create and garbage-collect a lot of them each frame.
Yes, it's generally good design, however I'd much prefer disorganized variables over that much of a performance loss. Also, wouldn't just a HashMap<char, int> work?
EDIT: Changed String to char
 

Reika

RotaryCraft Dev
FTB Mod Dev
Sep 3, 2013
5,079
5,331
550
Toronto, Canada
sites.google.com
Yes, it's generally good design, however I'd much prefer disorganized variables over that much of a performance loss. Also, wouldn't just a HashMap<char, int> work?
EDIT: Changed String to char
Thrashing the GC to the point that this stupidity does is never good design. It reeks of both premature optimization and coding blindly along conventions.
 
  • Like
Reactions: immibis

Planetguy

New Member
Jul 29, 2019
156
0
0
Yes, it's generally good design, however I'd much prefer disorganized variables over that much of a performance loss. Also, wouldn't just a HashMap<char, int> work?
EDIT: Changed String to char
HashMaps are pretty slow, and you're still passing it as a pointer.
 

trajing

New Member
Jul 29, 2019
3,091
-14
1
Thrashing the GC to the point that this stupidity does is never good design. It reeks of both premature optimization and coding blindly along conventions.
Generally good design to organize your variables, not to do anything along the lines of using a special class for doing that. The best option would be a complete rewrite of the MC engine, but that isn't happening until Minecraft 2, which probably won't happen.
...at least not from Mojang. MS might decide otherwise, and TBH after reading through this thread, I'd agree with them.
 

trajing

New Member
Jul 29, 2019
3,091
-14
1
I just got next to no sleep the past two nights, so take everything I say with a grain of salt.
 

Planetguy

New Member
Jul 29, 2019
156
0
0
Cleaning up would be a good idea (heck, that's what they've been trying to do), and several languages (like C++) supports abstractions like Minecraft 1.8 uses except without the performance penalty.

On the other hand, not being made of easily edited JVM bytecode would make Minecraft modding as we know it impossible, so I'll just stick to 1.7.10 for now.
 

jaquadro

New Member
Jul 29, 2019
182
-13
0
C# would be a good compromise, and Microsoft has been doing amazing things with cross-platform .NET lately. But really, it's not worth their effort to rewrite the game.
 
  • Like
Reactions: Flabort