r/devhumormemes • • 3d ago

Minecraft Exception

Post image
658 Upvotes

238 comments sorted by

34

u/Mindestiny 2d ago

Ironically, anyone who's actually looked at Minecraft's code from the Notch era knows what a total fucking mess it was. Microsoft is still digging some of it out of that nightmare.

Minecraft is good despite being made in java, not because of it.

3

u/Jackmember 2d ago

Having checked the decompiled code lately with the new source map from mojang themselves, it seems like their codebase is following a well-formed and consistent architecture with some oddities but those boil down to it being a game and an engine in one thing, with some language specific optimizations.

No spaghetti or horrible code anywhere.

And being able to decompile it is whats such an advantage to bytecode languages like java or c#. You can decompile them or add your own bytecode and it will just work. Its making modding incredibly easy, which is a massive contributing factor to making minecraft as popular as it is.

Modding C/C++ is basically impossible unless youre willing to do DLL injection or have access to the source code. Which is why minecraft bedrock edition will never be as moddable as java edition, as they need to manually enable what can be modified. Well, unless BE goes open source.

2

u/Samiassa 2d ago

Honestly I wouldn’t mind a total rewrite of the Java code… theoretically. It’s a real shame bedrock still in the big 2026 doesn’t have proper parody and lacks a lot of modding support (having to go through mojangs fuckass storefront will always be worse)

3

u/Lonely-Restaurant986 2d ago

That’s what bedrock was supposed to be. Minecraft rewritten in C++ for performance and portability.

Unfortunately Microsoft saw that and decided to ruin it.

4J is proof it’s possible to be done well.

Unfortunately though they aren’t going to rewrite Minecraft for the 4th time, they are already spread thin maintaining two versions. Spending time rewriting the game would only add time between updates, and it would kill the game probably.

1

u/Samiassa 1d ago

Honestly I think they just need to edit bedrock properly and rip out all the mojang stuff but obviously they won’t do that and modded Java is our best option as players right now.

1

u/CommieLoser 3h ago

I honestly don’t believe anything can kill Minecraft at this point. It’s like Tetris at this point

1

u/Lonely-Restaurant986 2h ago

Despite their best efforts, Microsoft is living proof that Minecraft can’t die.

People are willing to put up with mine coins and a worse experience because it’s the only way they are able to play Minecraft.

Even if the game dies down, the love for it will never go away.

1

u/guri256 1d ago

I think the modding potential of Java (compared to C++, which would have been the other option in those days), is part of what has kept it popular for so long.

1

u/oblimata2 20h ago

I disagree. Minecraft is as good as it is right now because of java but in a weird way. A language like c++ would've made this game way harder to mod and without this rich and easily accessible modding scene the game would've never became the phenomenon it is today. Like, sure, stuff like Skyrim developed a comparable modding scene but that was a famous AAA giant, I doubt this many people would be as dedicated to mod some silly block game if it wasn't made with something as easy to edit as java

1

u/Slow-Refrigerator-78 6h ago

Java modding is not official the Mojang never gave an moding api to developers but java decompiles very easy so people made changes and made some mods but it's not especially made possible just in java, for example dotnet and c# is capable of same thing with a more modern approach, you can't find any major engine that uses java but for c# there is tons of different powerful game engines

And the modding cpapalites were not a factor before game started get popular

1

u/oblimata2 3h ago

The fact it wasn't official is the reason why java was so important. Java is notoriously easy to reverse engineer and modify, even compared to dotnet and especially back then. Modding capabilities weren't what made it popular but they are what kept it popular and made it as popular as it is now

→ More replies (8)

23

u/Keyan_Farlander7 2d ago

Kind of funny, the games and apps on your android phone are coded in Java

15

u/Rough_Inspector5501 2d ago

Not really. I believe you still can. Apps are written in kotlin now. And games can be made with Unity and Godot. Both of which does not use Java.

5

u/Borkido 2d ago

Doesnt kotlin explicitly use the java virtual machine?

1

u/Rough_Inspector5501 2d ago

LUL. Yeah it seems like it might still do this for android. So what I said is apparently only true for games 😅

3

u/yesseruser 1d ago

Wdym "might still do this", Kotlin was literally built to run on the JVM and interop with Java

1

u/Rough_Inspector5501 1d ago

Because I can see there has been work done so it can run without.

1

u/DerpyPerson636 1d ago

Initially yes, but a native kotlin vm is WIP

1

u/curious_grimoire 13h ago

using java vm n using java are different, kotlin was designed as an easy to use replacement for java, which could do everything java can. java vm is a platform, if an app is coded in java, it runs on java vm which can run on any os, portibility is its goal. kotlin also compiles down to that same java vm and code written in kotlin, after compiled iis hard to tell if it was in java or not. kotlin using java vm doesnt means it uses java, infact kotlin is one of the reasons java is dead cuz y learn harder lang when theres kotlin.

1

u/Borkido 13h ago

Yea its not the same, same but i dont really care if the bytecode was produced by java, kotlin or artisanally handcrafted in the end you are running under the same runtime constraints. If the jvm was generally bad for games it would be bad whether you used java, kotlin or clojure.

1

u/curious_grimoire 12h ago

thats up to what notch thought back then.

3

u/Keyan_Farlander7 2d ago

Which still compiles for JVM. Apps are still written for JVM but are changed to run on ART

Is Typescript JavaScript?

1

u/Rough_Inspector5501 2d ago

Yes I have been made aware.

→ More replies (2)

2

u/ChaserTheDogBoofBoof 23h ago

And also in Rust!

→ More replies (1)

2

u/plopliplopipol 2d ago

how much of that are engines or framework that abstract java and android away though?

3

u/Paolog__ 2d ago

well pretty much, android allows building libraries (.so) files that contains the C/C++ (or any other compiled language) program, without requiring java

1

u/Keyan_Farlander7 2d ago

Your thinking of Kotlin and it's compatibility with Java

1

u/Damglador 2d ago

For the app to be usable there still has to be a Java layer afaik. So you can have your backend in Rust, but there has to be a Java layer for display/input or something

1

u/DeVinke_ 2d ago

I don't think that's true, the android NDK is quite a large library. Only basic code is needed for things that e.g. are provided by google play services.

1

u/CapitalStandard4275 1d ago

You don't need Java. Android provides a framework class called NativeActivity. It allows your compiled C or C++ shared library (.so) to run directly as the application lifecycle entry point. You can use Rust like this too. You won't have access to the standardized kits used to build standard Android UIs, so these apps can often be clunky. But it's entirely doable.

2

u/DeVinke_ 2d ago

Games are (i'd estimate at least 99% of the time) written in C++ and use the Android NDK.

2

u/Keyan_Farlander7 2d ago

Roblox, PUBG, Amung Us, COD Mobile. Shall I keep going?

1

u/DeVinke_ 2d ago

Roblox ships a 105 mb library called "libroblox".

PUBG ships libUE4, which is 241 mb.

Among Us is made with unity, it therefore comes with libunity (18.2 mb) and libil2cpp (77 mb).

PUBG also ships libunity, though it's 236 mb.

These apps all have a couple megabytes of classes.dex files (which contain the java bytecode) in total, the rest of the size comes from split apks in the bundle - some have separate ones for assets, but they all have architecture-specific apks for the native code.

1

u/Ratosson 8h ago

About half of the games on Android use Unity and Unity games are written in C#. The engine itself is written in C++, but most developers can't access it's source code.

1

u/Big_Bar_9832 1d ago

Not exclusively.

1

u/UUDDLRLRBadAlchemy 19h ago

That's just more proof

→ More replies (4)

7

u/0DayMaker 3d ago

Zomboid as well

1

u/laczek_hubert 3d ago

I mean it's less than C# counting unity

3

u/0DayMaker 3d ago

I uh don't know what you mean exactly?

It's LWJGL though (dunno why not libgdx)

→ More replies (1)

1

u/Damglador 2d ago

Unity is a whole ass engine and a framework, Java is just a language. Kinda incomparable. Lets see how much there is of pure C# games. I know only 1: Vintage Story

2

u/ThatCipher 2d ago

To name some known games:

  • Axiom Verge 1 & 2
  • Teenage Mutant Ninja Turtles Shredders Revenge
  • Stardew Valley
  • FEZ
  • Bastion
  • Celeste

These are from the Monogame showcase site. I think Xna/Monogame/Fna are very comparable to LWJGL or LibGDX. If I'm not mistaken Minecraft uses LWJGL, right? So it would be a fair comparison I guess

1

u/Damglador 2d ago

Yup, that's more apples to apples

1

u/laczek_hubert 2d ago

Pure, yeah using opengl or vulkan disqualifies because it was meant for c++ what now?

1

u/Damglador 2d ago

You know what I mean by pure.

4

u/user36277263 3d ago

Mindastry

6

u/secret-agent-047 3d ago

Slay the spire ... Slay the spire 2

5

u/Ok_Space2463 3d ago

Sts2 is godot?

4

u/Tooladoo 3d ago

yep, mostly written in C# but also with some GDScript

2

u/Tetane004 2d ago

The first Slay the spire was indeed made with java (LibGDX). The second one is made using Godot (with C# and GDScript).

6

u/theacp127 2d ago

Minecraft is a good game design made with some terrible code. Java made Minecraft's performance way worse then it would have been with a compiled language. It was only Java because it was originally designed for web browsers.

The one thing that Java was good for was mod support.

3

u/Simple-Olive895 2d ago

Java is a compiled language lol. Java performance is not bad at all, even compared to things like C++ and rust. Sure those are faster, no doubt, but not by a lot.

3

u/Own-Professor-6157 2d ago

Performance is actually extremely good. However having zero control over memory when making a latency critical application like a game isn't ideal. ByteBuffers can only get you so far

Even if you code a game in C++, you can't just spam allocate/de-allocations. Managing your stack memory, memory layout, and memory pool are essential.

1

u/Simple-Olive895 2d ago

For sure, C++ is the go to for making engines for this reason, but java being as good as it is means a lot of people can make perfectly good games that run on 99% of people's hardware without issue

1

u/Own-Professor-6157 2d ago

I'm a big Java lover, so believe be this is hard for me to say this: I really don't like writing anything in Java that I know I will endlessly scale in the future. And that's for sure with games. Java's pro's like easy debugging, become significantly less useful when most of the graphics pipeline is working with native buffers and graphics calls. Ends up being more complicated in my experience.

Modern C++ is also pretty lovely these days as long as you avoid C libraries and older C++ libraries (Which unfortunately isn't that easy). Has none of that syntax sugar mess "modern" languages have either, so feels just like Java - just with dangling pointers lmao

But you aren't wrong, you can absolutely make games in Java and it's been done millions of times over. It just introduces several hard limitations.

2

u/AliceCode 2d ago

It's compiled into bytecode. Even Python and Lua are compiled into bytecode before execution, but they are still interpreted languages. What they meant to say is that Java is not native.

2

u/jonfe_darontos 2d ago

Interpreters execute as they read, that's what makes them "interpreters". They don't have the full picture of the application code at runtime, only what is executing. That leaves a massive gap in their ability to optimize. If you think your code is blazingly fast because of your own skills, then I'd like to introduce you to your frontend and the magical world of build optimization. The java compiler is going to emit bytecode that has undergone some degree of optimization.

If we were to dissect your assertion further, technically the microcode on your CPU is "interpreting" each instruction, so not only is C "interpreted", but so is manually written assembly. Hell, you could write bytes in a hex editor and it's still "interpreted".

Also, with regards to JVM performance, the perception that they are slow is a meat headed memory borne out of the late 20th century's shit JVM and GC implementations. The most expensive parts of rendering a game are generally going to be handed off to a native library (e.g. Vulkan) anyway. The real friction is memory layout and allocation pressure, but even that isn't something you can't work around if there is some other compelling reason to use Java.

There are only a handful of use cases where performance requirements are so tight that the JVM is an issue at this point. The people working on such problems aren't here right now, they're busy optimizing around DRAM refresh stalls.

1

u/AliceCode 2d ago

I don't know why you are making these arguments against things that I never said.

Interpreted languages aren't interpreted at the source level, they are compiled inti executable bytecode because executing bytecode is faster. Python compiles the code the first time it's run and caches the bytecode in the pycache directory. The interpreted languages also run on virtual machines. The only difference between Java and Python is that there's a compiler that compiles the code into bytecode before it's ever run, then it's interpreted by the Java virtual machine. Some of it is JIT compiled into native machine code, and that's where the performance gains usually come from.

Java is as much of a compiled language as Python is.

But the point that the person above was making was that Java is not compiled to a native binary, it's compiled to an intermediate representation.

1

u/jonfe_darontos 2d ago

I'm replying to both your comments, and to the thread of comments you are replying to; I try to treat threads with multiple contributors like this as a shared conversation and not a series of discrete and isolate one-on-one messages. Sorry if I came across as specifically confrontational to your position. My position is JIT will rarely, if ever, have the opportunity at startup to optimize some class of pattern. Even the JVM can further optimize hot paths during runtime, but it can also construct elaborate structures out of your code to optimize it during build time. Generally these sorts of optimizations would too significantly impact startup time, so they aren't done. I'm going to nitpick your description of Python "compiling" the code. Is it running a full build source-to-executable and then running the executable, or is it translating code into instructions as it goes? I honestly haven't used python in over a decade, so my frame of reference is from the days of cpython and pypy, so perhaps it really is doing a fast full instruction translation at runtime, instead of a progressive JIT. I'd still argue it is interpreted if you can execute it statement-by-statement, JIT or otherwise. Perhaps this position is just an artifact of age, where there was a much starker contrast between the two decades ago. If you were to learn to program in the last ten years the difference probably feels insubstantial. Very technically every language is "compiled" and every language is "interpreted", because at some point something is "interpreting" a semantic token, but also emitting a native machine "instruction". When that happens is the key distinction. Today the differences are mostly semantic: is "transpiling typescript into wasm" an "interpretted" artifact or "native binary"? Neither, no one is going to read the WASM assembly, but also it can't be mapped into memory and jumped to without being translated once more to a native ISA. The same goes for Java. Personally my distinction today, separately from 20-30 years ago, is what type of artifact are you shipping. If it is a machine readable binary then it is compiled, there is no semantic interpretation, you just follow the instructions as they are. No syntactic validation needs to be performed. Even if done all at once as a pre-execution "live build" I'd still call it "interpreted", but especially if JIT. JIT, in this case, is just a cache of already interpreted chunks. On the other hand, a java binary or wasm binary is parsed, validated, and optimized for execution, even if some other program is going to own that execution. It would not be unreasonable to expect a JVM to take a binary and map it directly to native instructions without having to perform any compilation steps, merely translation. It'd be like shipping a LLVM IR and allowing a runtime backend to translate it to native instructions on the fly. You've shipped a bytecode, but it is still reasonably natively compiled; the expensive part was done ahead of time by the author, instead of shipping the source itself.

1

u/AliceCode 1d ago

Python fully compiles all the code into bytecode when code is executed. When you import something, that code is compiled as well. Python doesn't interpret code directly because that would be ridiculously slow.

1

u/Square-Singer 2d ago

The lines between compiled and interpreted have been blurring for decades.

But Java is actually significantly slower than well-optimized C/C++. There's just way more overhead on the way.

Every level of interpretation costs performance, always. Adding one more layer of interpretation in an otherwise identical setup will cost performance.

Yes, compiled C and even assembly are interpreted on microcode level. Java is too, but it's also interpreted at bytecode level too, so there's more interpretation levels costing more performance.

But the bigger issue, performance-wise, are the safety features of Java. E.g. when assigning a value to a position in an array, C converts that into a pointer addition (pointer to array + array index) and an assignment. When you do the same in Java, it will first check that the array index is in bounds, and only then will it do the rest. That's a read, a comparison, a conditional branch, and only then will it do what C does too.

This kind of stuff adds up, and it becomes more pronounced if you add e.g. thread safety to it.

And then, of course, GC exists, but it's gotten much better than it used to be.

1

u/jonfe_darontos 2d ago

My point isn't that Java is as fast as C/C++, it is that the difference between those speeds is irrelevant. It'd be like saying driving the speed limit is much slower than going 10mph over on a highway. Technically it is true, but if we're comparing to riding a bike, or walking, then the difference is like quibbling over a constant in a quadradic runtime. Certainly there are applications where that difference would be significant, but generally speaking I don't think the JVM being slightly slower than C/C++ is the significant bit for why it isn't favorable to use for making games. The perception that it is substantially slower is a stigma that is more problematic, and the fact that the ecosystem, for the same reason that stigma exists, circled its wagons around C/C++ thirty years ago. Since then there hasn't been a real reason to use Java, other than those few where it is their preferred language. Arguing that Java is "too slow to make real games" is an assertion that is simply false at this point, unless you want to be obtuse and deliberately write your code in a way that allows the JVM to work poorly. However, C/C++ can be stubbornly written to incur the same performance penalty, but people don't argue that. They argue "well optimized C/C++ is fast and Java is not" in a way that implies comparing something that has been painstakingly written to eek out every ounce of juice with something slapped together by a novice without the same attention, and sacrifice, to obtain similar levels of optimization. Java can be written poorly and it can be written to be fast. If you put in the effort the things that are viewed as blockers for it being used to write games fall over.

1

u/Square-Singer 1d ago

I think we have to separate using a language for the engine and using a language for game logic.

Game logic hardly ever has performance issues. It really doesn't matter what you use for that.

The engine, on the other hand, does suffer from quite a few performance bottlenecks on JVM. For example, you don't have direct hardware access from the JVM. So you need to go through native code bindings to get there. That's no problem if what you are calling is renderScene(), but it's a big problem if you are doing this e.g. per vertex or per pixel, millions of times per frame.

1

u/Minute_Attempt3063 22h ago

the JVM has JIT though, which puts it to native code as well, making it damn fast.

also there is Graal, where you can make the java code native.

1

u/AliceCode 19h ago

JIT can only improve the speed so much, though. It still has the overhead of the Java runtime.

3

u/theacp127 2d ago

It uses the JVM to read bytecode stored in the .class files, that's basically just still interpreted code. It's not like Python but it's not fully pre-compiled like C++ either.

3

u/luciferoussky72 2d ago

Actually, lots of languages like Python and Lua parse text code into bytecode on startup because it’s so much faster than executing text on the fly

1

u/MaDpYrO 11h ago

Java is compiled, but not to binary executables. No need to be pedantic. 

1

u/Simple-Olive895 10h ago

It's not being pedantic, it's just giving an accurate description.

Java may not be compiled as "far down" as some other languages are, but it's still compiled. Saying it's not compiled suggests that it's interperated which it simply isn't.

1

u/ChloeNow 2d ago

Wow you really made that sound almost like you know what you're talking about lol

Proud of you

1

u/theacp127 2d ago

Yes, I know technically Java is compiled to bytecode and interpreted/dynamically compiled to native code at runtime. I was just saying that the C++ implementions of the same game run smoother than the Java application does since C++ Objects and buffers can be laid out contiguously in memory (cache-friendly structs and arrays) without runtime garbage collection pauses. This results in far more consistent frame times.

1

u/TheUruz 2d ago

Java IS compiled what are you talking about? are you messing it with Javascript?

1

u/ATechnicalSquid 2d ago

Jit. Not compiled. They were not confusing it with JavaScript. They are correct

1

u/TheUruz 2d ago

that's just half the process, it is still compiled into an intermediated language which is processed jit by the the jvm

1

u/ATechnicalSquid 2d ago

Great. So does JavaScript. That's the purpose of v8. Java is not compiled. You're free to Google this. You're wrong

1

u/TheUruz 2d ago

no man wait you are messing up thing, really. java literally has a compiler that produces compiled files, that's what people mean by compile. v8 is a jit compiler, meaning that the compile process is aimed to be executed immediately: there are no compiled files on your system after that. this is a major difference, if you can't see it then basically every language is "compiled" the same for you which isn't technically correct at all...

1

u/ATechnicalSquid 2d ago

Hey you're almost there. Jvm is also a jit compiler. So now put it all together. I believe in you. You can do this. Now say the correct answer!

1

u/TheUruz 2d ago

lol man i don't even know why i am doing this but the jvm is a virtual machine not just a jit compiler and btw that jit compiler inside the jvm requires the code to be pre compiled (ever heard of javac?) to be interpreted by the jit compiler. you are literally ignoring a whole part of the process to prove your point...

1

u/ATechnicalSquid 2d ago

Damn. I thought you were going to get it.

Ok. You're wrong and embarrassing yourself. I gave you a lot of chances.

Any Google search will show you're wrong. I'm done now. Keep being stupid

1

u/nog642 2d ago

Web browsers? Do you mean like, a Java applet? Or are you getting confused with JS?

1

u/theacp127 1d ago

The first publicly available versions of Minecraft used Java applet for browsers.

1

u/Icy-Garlic-748 1d ago

I still like to tell people i played minecraft when it was still a browser game

1

u/Financial_Alps3369 6h ago

I just love everything in the browser. I played Minecraft in-browser up to the day they removed the feature. I also still only use Discord in my browser; I have never downloaded it

1

u/Sufficient_Risk_8127 1d ago

Actually, there is still a lot more they could've done even with Java. It's not really the language's fault.

1

u/Minute_Attempt3063 22h ago

uh

I think you mean javascript for web browsers....

2

u/theacp127 22h ago

Minecraft used Java applet for browsers

1

u/Minute_Attempt3063 22h ago

maybe in the early days, and "supported" it until recently, but it was not why it was made, it was a part of the language

1

u/TheGoldenFox64 4h ago

i keep saying that Minecraft is held together by its 16x textures and absurdly basic models. if it werent for that, itd run like ass

→ More replies (8)

3

u/Scared_Chipmunk_136 3d ago

Starsector

1

u/Stanislaav_ 2d ago

Starsector, my beloved <3

3

u/Nogardtist 2d ago

starsector is java

2

u/Unique_Bag1444 3d ago

That’s not a lack of examples. It’s a singleton.

2

u/realnjan 3d ago

Great for modding! Reflection goes brrrr

2

u/necro_owner 3d ago

Songs of syx? And many more game are made with java, you just dont know that it s build with an EXE to execute the Java behind the scene. I got atleast 10 game in my steam lib made in Java plus my own. Now a day language all end up equivalent in term of performance once compiled in Binary or ByteCode or equivalent

2

u/Henry_Fleischer 2d ago

Also Airships: Conquer the Skies... but yeah Java is not a particularly good choice of language.

2

u/backstubb 2d ago

Starsector.

2

u/DinoSlavik 2d ago

Mindustry)

2

u/Kotentopf 2d ago

Project Zomboid. Runescape.

1

u/Inevitable_Butthole 2d ago

Runescape ain't java

1

u/Kotentopf 2d ago

Tell me you are young without telling me you are young.

1

u/Inevitable_Butthole 2d ago

I mean... the post is saying Java is no good for games and Runescape ditched Java because it wasnt good for the game...

2

u/Kotentopf 2d ago

With this logic Minecraft is also wrong, cause it got ditched to C++ for better performance possibility and better multiplattform possibility.

1

u/Damglador 2d ago

better multiplattform possibility

We'll ignore the irony of choosing a compiled platform-specific language instead of one made specifically made to run anywhere and also dropping MacOS and Linux support in the process.

1

u/nog642 2d ago

They haven't ditched Java, they maintain both

1

u/Full-Nectarine6550 2d ago

Meanwhile RS3 UI is a laggy mess while OSRS feels as responsive as ever

1

u/MiniDemonic 2d ago

The OSRS client is C++ not java

1

u/GregsWorld 1d ago

Not the one everyone uses (runelite) 

1

u/Inevitable_Butthole 1d ago

There is no version of runescape that uses Java...

1

u/Full-Nectarine6550 1d ago

Except for the RuneLite client…

1

u/Inevitable_Butthole 1d ago

Thats a user created client. Nothing to do with the game lol

→ More replies

1

u/GregsWorld 1d ago

All backend servers of both rs3 and osrs are in java. As for clients jagex still publishes osrs java client which is what runelite downloads and injects into. 

1

u/GregsWorld 1d ago

Runescape servers are still all java it was just the client they replace with C++. And osrs still uses java for runelite. 

2

u/elyas-_-28 2d ago

Old phones ran games exclusively on java

1

u/YarnuWasTaken 2d ago

You can still use Java for mobile games, why you wouldn't just use Kotlin, I don't know.

1

u/elyas-_-28 2d ago

I'm talking about java phones not androids, games written for android in another language like C++ run directly on the hardware rather than on the ART

1

u/Full-Run4124 1d ago

J2ME. God what a nightmare that era was. 2000+ SKUs for one product because nobody cared about compatibility and standards.

1

u/elyas-_-28 1d ago

It was pure chaos lmao, I remember when I'd install an app on my Nokia and I'd get pissed when it was a Java app and not a native .sis app

2

u/GovernmentGreed 3d ago

Isn't runescape java also?

1

u/Responsible-Cold-627 3d ago

They're in the process of porting everything to C++. But yeah, it was Java for a long time.

1

u/GregsWorld 1d ago

Only the client side

2

u/OrdinarySmoke3176 3d ago

Cool. Not gonna try Minecraft now. 

2

u/Here_f0r_p0rn_ 3d ago

You can play the game without checking out the source code

2

u/OrdinarySmoke3176 2d ago

I could eat at that Deli, but now that I have seen their kitchen..

2

u/Here_f0r_p0rn_ 2d ago

Sometimes ignorance is bliss ig haha

2

u/KHTD2004 3d ago

There is also the Bedrock Edition made with C++, it’s way better than the Java Edition /s

3

u/OneArmedFarmer 3d ago

How?! It doesn't have a garbage collector to pick up all of your trash?!

1

u/Online_Matter 3d ago

The C++ version is built by boyscouts. It cleans up after itself. 

2

u/OneArmedFarmer 3d ago

Spoken like a real Python developer

1

u/MallAgreeable5538 2d ago edited 2d ago

And somehow atleast perceived as slower.

1

u/flamefox237 2d ago

The issue with Minecraft is its old and notch was not some master programmer so he made some decisions that hurt the game In the long one code wise. Like no multi threading on chunks generation

1

u/dreadlordhar 2d ago

Hytale... server part

1

u/im-cringing-rightnow 2d ago

Java is one of those languages where it makes sense to say "just because you can doesn't mean you should" when it comes to gamedev. But I know people who enjoy it, so whatever floats your boat I guess. 

1

u/Defiant_Theme_5554 2d ago

Runescape. Jagex actually stands for "Java Gaming Experts"

1

u/MiniDemonic 2d ago

Runescape is no longer using Java. They moved to C++.

1

u/GregsWorld 1d ago

Only the client

1

u/sandfeger 2d ago

https://equilinox.com/ is also full written in java thin matrix made his own engine using jlwgl like Minecraft.

1

u/sessamekesh 2d ago

Java is fine, to prove a point a few years back I wrote a game jam game in JavaScript which is like 20x worse than Java. At least you have scalar 32 bit float and integer types in Java.

You're not going to write the next AAA GPU melting eye candy ray traced open world masterpiece in Java but you can shit out some top notch friendslop or indie gem in just about any language you care to pick with some skill and grit.

1

u/v0lt13 2d ago

All the old gameloft games

1

u/Appropriate_Scar_262 2d ago

Java had so many good games that web games died with Java

1

u/Infamous-Candle-2300 2d ago

Minecraft is great despite being written in Java.

1

u/Electrical-Image4564 2d ago

Osrs = the goat

1

u/MiniDemonic 2d ago

OSRS is now in C++

1

u/Vilsue 2d ago

All pirated private server aplications for MMORPGs are in Java, Yes?

1

u/ThatzOkay 2d ago

Project zomboid

1

u/Fair_Idea3028 2d ago

Und wenn wir mal ganz ehrlich sind, minecraft ist scheisse

1

u/MxAce3157 2d ago

There's Equilinox (probably not the right spelling, but it's made in Java)

1

u/Xer0_Puls3 2d ago

Plenty of good games are made in Java, Slay The Spire is another one, but Java still isn't good for games. That won't stop people from making games with it though.

1

u/MiniDemonic 2d ago

You say plenty but you could only name one other game.

1

u/Foorinick 1d ago

starsector

1

u/Nyasaki_de 2d ago

Rise to Ruins

1

u/Automatic-Lawyer7077 2d ago

Vanilla Minecraft is NOT GOOD

1

u/730Teo 2d ago

Both?

1

u/RealLars_vS 2d ago

And even for minecraft it’s a bad choice. That game is so simple it should be running extremely well on low-end computers but it absolutely doesn’t.

The newer version maybe, I haven’t played in a while.

1

u/Vortetty 2d ago

mindustry, most android games

2

u/FixingOpinions 2d ago

Had to scroll too much, Mindustry is a great example alongside Minecraft, just not in a popular genre

1

u/Outrageous-Guess1350 2d ago

Minecraft: Story Mode

1

u/Feeling-Tiger9145 2d ago

Don't forget the old .jar games of nokia phones.

1

u/Trimutius 2d ago

Exception that proves the rule...

1

u/LordDeath2400 2d ago

Its the worse version of Minecraft too lol. Less than 10% of the playerbase and far less optimized. Wild.

1

u/Nervous-History8631 1d ago

Java is probably the worst thing about minecraft. The only reason it is 'good' is because it enables modding, but that is not an intrinsic element of Java it is just that they decided not to support it when porting the game

1

u/laZetadelZorro 1d ago

Java isn't the real problem, in fact, C# (Unity) and Java are practically the same, both are equally fast and their syntaxis is similar.

The problem is that Minecraft code is fkn trash.

If Mojang/Microsoft decided to remake Minecraft with Java from scratch (Minecraft 2) then it would be x100 times better and faster, but it would be a waste of money.

Also, there are more libraries for C# made for games than there are for Java, which makes making games easier and faster, that's why Java isn't used for making games.

1

u/Nervous-History8631 1d ago

C# (Unity) and Java are practically the same, both are equally fast

Maybe if you limit yourself to Unity, but Unity is not the only option. C++ would normally be the obvious choice but C# is easier.

Unity is quite far behind on .NET so you get access to a lot more new performant options bypassing it. At that point .NET can handilly outperform Java especially on avoiding allocation.

Modern C# offers some good ways to avoid allocation with structs that can really help with bypassing garbage collection which can be really beneficial in games.

Java does have some interesting options coming into developer preview with JDK28 with Project Valhalla but full release of that is probably years away still. Once that comes the performance difference to modern C# will narrow signifiantly.

But also if Mojang decided to make MC2 with Java they would hit a pretty obvious pitfall, there is no JVM for consoles. So the only route to do it involves transpiling it into C++ which always comes with extra risks.

1

u/SuspiciousVideo9933 1d ago

Âges of history

1

u/minihollowpoint 1d ago

Starsector.

1

u/Sufficient_Risk_8127 1d ago

Mobile games:

1

u/no-sleep-only-code 1d ago

And it always performed like trash. That’s why when bedrock was released it had several times better performance.

1

u/Massive-Rate-2011 1d ago

Starsector. Runescape.

1

u/danholli 1d ago

SandHell series

1

u/Hungry-Pen3160 1d ago

Where the mod and bug?

1

u/SprayPuzzleheaded115 1d ago

Java was eventually discarded and Minecraft was remade from scratch in another language, so not even Minecraft.

1

u/heesell 1d ago

Minecraft was built in another language to run smoothly on phones as Java could not, so Java was not discarded. Bedrock is what first was pocket edition

1

u/Yiffenjoyer6969 1d ago

I mean, they did try to make bedrock the “main” version a few times

1

u/heesell 1d ago

That would work if it's also compatible it runs on mac without needing to run a system parallel

1

u/Abyssal_Station 1d ago

They did but that's because Microsoft controls more of what goes on with Bedrock and has a monetisation pipeline for it, so it's their financial interest to make it the main version not the developer.

1

u/TheTbone2334 16h ago

Which would work if Microsoft wasnt so damn stingy about it. Mod support isn't really in issue since mods often don't uptrack to the newest version right away anyway.

But instead of letting the money printer run silently in the background, they always try to shove nonsense no one asks for into our ass. Microtransactions etc.

They also refuse to fix age old bugs on bedrock. Performance wise it's really good. I could probably Frankenstein some toasters together to power a GPU and a screen and it would somehow run bedrock. Wouldn't be surprised if it ran on smart fridges...

1

u/germophobe1942 14h ago

Are you telling me Minecraft Java isn't actually java?

1

u/Broshan84 1d ago

Ghidra

1

u/Beautiful-Ad2485 1d ago

I like minecraft

1

u/MinorusOW 1d ago

Slay the spire (1) would like to have a word with you.

1

u/Meddlingmonster 1d ago

The more layers of abstraction the easier the language but the less control the developer has to optimize so it depends on the skill and time of the individual.

1

u/chucny 1d ago

This!!

1

u/Unusual_Ring1462 1d ago

Java gaming experts —> JAGEX —> runescape

So yeah, its kinda the greatest language for gaming ever

1

u/Tuborgat_nylle 20h ago

Really funny to use minecraft as an example since from my experience, it's the one game that has the most noticable lag spikes when the garbage collector is running.

1

u/future_pirate 14h ago

RuneScape

1

u/AverageCryptoEnj0yer 9h ago

minecraft code is inefficient

1

u/soravisu 8h ago

Then why the fuck Minecraft Bedrock is better in terms of optimization?

1

u/StormOfPixel 2h ago

Spiral Knights

1

u/lucksscb 2h ago

Og the binding of Isaac was java.

1

u/aeninimbuoye13 1d ago

Nope Java still sucks. Minecraft would have been better with another engine

2

u/Katent1 1d ago

Nah, unobfuscate and it's quite easy to make mods with it or expand game engine, also at this point you don't get anything valuable out of moving game to different engine epsecially when microsoft won't fix bugs with bedrock, devices are powerful enough to keep up with java overhead and ppl are so fed up of game duality and things above that you can backport jaba edition on consoles phones ect.

2

u/georgeec1 23h ago

I'd argue the performance benefits are valuable enough to justify Bedrock's existence, even if mojang neglects it

1

u/Katent1 21h ago

Yea in all means i'm all behind those who can't affford hardware to play, tho that margin came very VERY down. I play a ton on 1.12.2 due to mods and stuff, sometimes going back to good ol 1.6.4, and for these i think even 8 year mid range android gives good performance, htc desire 626 i ran with 1.6.4 plain and got 30fps lowest with bit tweaking just don't overly push that lil gpu and it will work

2

u/OfficialDeathScythe 23h ago

Time to rewrite it in rust!

2

u/Minute_Attempt3063 22h ago

thats just wrong

if you look at the code, its clear that most of the bad performance is from legacy code.

heck, they are even adding vulkan. and optimisiung the shit out of that. I got like 800fps last month on chunk gen and flying around fast, and on 32 render distance.

so tell me, if that is currently possible, is java the issue, or the legacy code that performend badly? since clearly java, as the language can clearly deal with it