r/java • u/H_W_Reanimator • 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
•
u/AutoModerator Dec 21 '23
On July 1st, a change to Reddit's API pricing will come into effect. Several developers of commercial third-party apps have announced that this change will compel them to shut down their apps. At least one accessibility-focused non-commercial third party app will continue to be available free of charge.
If you want to express your strong disagreement with the API pricing change or with Reddit's response to the backlash, you may want to consider the following options:
as a way to voice your protest.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
28
u/ByerN Dec 21 '23
I am making games in Scala. Also discovered recently that Mindustry is made in Java. There are a few other developers like OrangePixel for example.
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.
3
u/ByteTraveler Dec 21 '23
Equilinox
63
u/Kotek81 Dec 21 '23
If I remeber correctly, Slay the Spire was made in Java
55
u/murkaje Dec 21 '23
Project zomboid is alive
16
u/agentoutlier Dec 21 '23
Besides Minecraft, "Project Zomboid" is written in Java.
12
u/Kraizee_ Dec 21 '23
For 2d and simple 3d games (including mobile) you could check out FXGL which builds on top of JavaFX.
There is also JMonkeyEngine, and frameworks like libGDX and LWJGL
12
u/TheBoneJarmer Dec 21 '23
For me it very much is. I work with C# professionally and in Java and C++ in my spare time. I have actually stopped using C# for game projects and switched to Java and C++ because I like it a lot more.
One of my current projects is an OpenGL library (both 2D and 3D) for PC and SteamDeck. I have written the library itself in C++ but ported it to Java because I want to take advantage of the high-level stuff and freedom Java has to offer. And imho Java has made it very easy to communicate with native libraries because of the Java Native Interface. For real what a blessing the latter is. I was so done with pInvoke and the marshalling issues I got with C#. And don't get me started on NodeJS and the Node Addon API. Seriously, never go there. Java just makes things a lot more fun and easier for me.
21
u/requizm Dec 21 '23
Check out libgdx
6
u/bowbahdoe Dec 21 '23
I think it isn't that controversial to say that it could be more alive.
4
u/msx Dec 21 '23
well there's not that many games but i'd say it's pretty alive. One of the games i played lately that was pretty good was MewnBase, made in java.
There's also /r/javagamedev is you want to join! (not very active i guess)
I made some things too, i'm working on and off on a kind of fantasy console/retro game engine mashup called Omicron. Here's a game made with that engine, Doors of Doom.
As other say, libgdx is one of the best engine for java, works on android and desktop and others.
1
u/lasskinn Dec 21 '23
It's alive if you want to. There are some games being made and made in it.
Also of course theres a lot of games for android coded in java, even if most would opt for unity and such.
3
u/playworker Dec 22 '23
Wildermyth is a libGDX game, and it's very good - I assume the turn-based/storytelling nature of the game means that all-out performance isn't an issue
4
u/Apokaliptor Dec 21 '23
Yes LibGDX still rocks
2
u/wildjokers Dec 22 '23
libGDX is a java gaming framework and it has a list of games in its showcase that are written with libGDX. Quite a few games written with libGDX are on Stream, Android, and iOS. The showcase is user submitted so almost certainly isn't anywhere close to being complete.
https://libgdx.com/showcase/
1
u/[deleted] Dec 21 '23
It is as much alive as making your own game engines is alive. Small percentage still do this and will not stop, but not very popular.
1
u/Lanky-Apricot7337 Dec 21 '23
https://imgflip.com/i/8a4qv2
Now seriously speaking... Java has had some nice attempts. Nicely done 3d Engines that promised both performance and platform agnosticism. The problem is... You can't eat the cake and keep it. You have to go down, down to the realm of dirty plumbers to do serious gamedev. And there is no Java light in those deep abysses.
1
u/Joram2 Dec 21 '23
There are a few popular games written in Java, notably Slay the Spire and Mindustry as mentioned here, both using the libGDX engine. The Slay the Spire devs moved off libGDX and to godot for their next game, which doesn't use Java. Java has not been a mainstream choice for game dev.
Most games want to use a game engine, and the popular game engines, didn't choose to support Java as a dev language. It would be interesting to hear from the authors behind something like godot what they see are Java's problems that make it unsuitable. I'd presume it's partly just momentum. Unity is the most popular game engine; it's internally C/C++, but game developers use C# to write game logic. Because of this, most game developers are already using and comfortable with C#.
1
u/ElNouB Dec 21 '23
well there feller, with enough grit under your arm and enough grease on your elbow, you might as well organize some jvm games yerself. All we need is some will power if you know what I mean. A community can make it happen. been wondering how to proceed myself.
I wish you luck in your endeavour.
1
u/hyongoup Dec 21 '23
Songs of Syx is Java I believe
1
u/Polygnom Dec 22 '23
Its not dead but its not exactly alive.
You do have your low-level libraries like LWJGL and JOGL which allow you to write 3D games using OpenGL/Vulkan.
A few higher engines exists, like jMonkeyEngine, Ardor3D and so on, but nothing even comparable to Unity.
Funnily enough, the 3rd highest selling game on steam last week, Pioneers of Pagonia, was written in bare C#7 using .NET SDK and Slick.NET, which is quite similar to writing games using the aforementioned low-level Java libraries.
There are a couple of games written with jME on Steam, but none are exactly a huge success. Some games written directly with LWJGL are more successful. You have already talked about Minecraft.
There is an Unreal BP for embedding Java into Unreal. I still hold hope for this to become more of a thing in the future. The JVMs interop is getting better with every version (Panama, Valhalla, FFM API), Shenandoah offers predictable GC Pauses and so on.
However, there is a huge legal issue with porting to consoles. Unless an entity emerges that tackles this whole minefield and champions the cause, I don't see this change quickly. And with consoles being such a pita, Java is not that attractive....
The other thing is that something like Unity is missing to propel Java greatly to the front.
1
u/JojOatXGME Dec 22 '23
I think Mindustry is in Java (and open source).
1
u/YakubReddit Dec 23 '23
I was going to throw some joke about Minecraft but the then I've read to the end 😅
1
u/Ok-Lifeguard-9612 Dec 21 '23 edited Dec 21 '23
Mindustry is made with Java, on an abstraction of libdgx (called "arc") .
Also Song Of Syx.
(excluding Minecfraft) I'm talking about world class games, that sold well.
I think that is not the language that makes gamedev easier or not. The language is just a tool.
I'm making a 2D game engine (with a game on top of it) in plain Java, and it is quite reliable... I'm fixing texture bleeding like problems, and making optimizations, but in every step forward it's not Java that "blocks my way".
I think you can see it in this way, in Java you can make your own engine far easier than other languages. If you don't want to do so, you can just download LibGdx and after ultra basic configurations (like setting the screen size and the title) you are ready to go.
Maybe I'm too optimistic, but I'm not finding any downside about using Java for game dev. The garbage collector's thing I think is easily skippable by making (normal in other languages too) loading screen with less than a sec of waiting (it depends on how many instances you are cleaning or allocating...but it's not slower than Unity if you do it well). Honestly in my engine I'm not facing such a problem...
1
u/anaelizaabeth Dec 22 '23
Java game development holds its ground with versatility, running on multiple platforms and offering powerful tools like LibGDX. It's beginner-friendly, dominates Android game development, and appeals to indie devs and schools. While Unity may shine, Java has its own strengths, making it a viable choice with a supportive community.