r/ProgrammerHumor • • Oct 07 '26

Meme minecraftException

Post image
9.3k Upvotes

830 comments sorted by

View all comments

Show parent comment

1

u/r2d2rigo Oct 07 '26

Java has nothing to do with this, rather how it's used by the devs.

5

u/WallBurnt Oct 07 '26 edited Oct 07 '26

That's just not true.

Java is fast, but there is a reason why UE, Unity, and Godot are written in C++ and why most game devs want to use C++ for anything computationally complex.

Game engines are incredibly complex pieces of software. Looking at it at a lower level than just the programming language, the complexity of the math it has to do is absolutely nuts. The math they are doing to render something in 3D is taught in classes that even Math majors struggle with in college.

Just the abstraction layer between the JVM and the CPU is enough overhead to cause serious performance issues. Where as, in the backend for a web app or system process, that's trivial and you can run extremely heavy apps hosting millions of users on relatively little hardware.

Source: On and off Java dev since 2011.

-3

u/r2d2rigo Oct 07 '26 edited Oct 07 '26

99% of games don't need the performance of AAA engines that use zero overhead APIs.

Zomboid, even after 14 years in development, has had zero performance enhancement iterations. It could have been done in raw assembly and it would still perform like dogshit, because getting the game to run well seems to be out of reach for the dev team.

Source: professional dev and gamedev since 2010 that has seen a fair amount of good looking, well selling, ok-performing games done in the weirdest languages and runtimes known to man.

5

u/petrichorax Oct 07 '26

> Zomboid, even after 14 years in development, has had zero performance enhancement iterations

That's just not true. Build 42 was an ENOOOOORMOUS performance improvement over Build 41, they're night and day different. They fixed up a lot

2

u/WallBurnt Oct 07 '26 edited Oct 07 '26

Raw assembly, you mean like the NES games and Rollercoster Tycoon that can literally run off a random microprocessor in my toaster if the instruction sets matched? I wouldn't even need the full toaster!

Just don't. You're out of your element here and I have nothing else to say.

0

u/r2d2rigo Oct 07 '26

Ah yes, let's compare 30 year old games from back when a GPU wasn't even a thing.

Better get educated first before trying to teach others, mate.

0

u/rosuav Oct 07 '26

That's true, technically, but also the games that really don't need performance are generally not going to be written in Java either - because there's no reason to. What benefit does Java give you?

2

u/JustToViewPorn Oct 07 '26

Java is consistently the slowest for application execution times when compared to C# using common libraries.

2

u/WallBurnt Oct 07 '26 edited Oct 07 '26

From a cold boot, yeah. Java is much slower to start up.

But once they are going Java and C# are very close.

Fun fact, C# was Microsoft's answer to the try and beat out the juggernaught that was Java in the late 90s.

I actually even took an assessment from a company recruiter when I was in my senior year of college. She told me it was C# but the last 5 questions dealt with the jdbc driver, but they were so syntactically similar back then I had no idea until I saw that. I had a perfect score, but tbf it wasn't hard.

Edit: Also if this is a reference to Unity, then you should know the Unity engine is written in C++ and you can still use C++ in the engine, but C# is much simpler to read and write.

-1

u/r2d2rigo Oct 07 '26

A bike will always be slower than a car but both can take you to the same destination.

1

u/rosuav Oct 07 '26

I disagree. I've zoomed past cars on my bike because I can use bike paths and they are stuck in traffic. Also, my bike can go to more destinations than a car can.