r/java • • Dec 21 '23

Is Java gamedev alive?

It seems this days even android games are made using Unity. I wonder if there are JVM games! Is Java (or Kotlin/Scala) gamedev still alive?

(Except Minecraft ofc)

164 Upvotes

118 comments sorted by

View all comments

105

u/Brutus5000 Dec 21 '23

There are two things that blocked serious game development for more than a decade: garbage collector which freezed the application and a memory model that works as an anti pattern to how modern cpu cache architectures work. Garbage collection has massively improved in the last 10 years. Improving the memory model is heavily worked on by Oracle for multiple years, but still work in progress.

So there is a tiny ecosystem that can't compare with the hundreds of millions of dollars that went into C++ & friends ecosystems.

It might get interesting again in a few years though if Oracle delivers what they are promising.

17

u/Joram2 Dec 21 '23

Garbage collection hasn't stopped C# or Lua from being wildly popular in game development. I'd dare to say a majority of games are using either of those and garbage collection hasn't been a major complaint.

Java's lack of good native-build and native-interop has probably been a much bigger inhibitor to use in game development.

The biggest factor is the people who created the most widely used game engines, specifically Unity, but to a lesser extent, godot, they picked C#, and they didn't pick Java. Why? I'm not sure, but that's the reason right there.

7

u/westwoo Dec 21 '23

More boilerplate and rigidity alone is enough of a reason. If you were designing a game engine in 2004 you'd be crazy to pick Java 1.5 over C# even if interop was equally good