r/ProgrammerHumor • u/[deleted] • Jan 01 '23
Meme I can't think about another video game using Java. I mean, there WILL be more but i haven't saw them.
4.0k
u/Tashre Jan 01 '23
What about the turning Java into rent and food game?
1.1k
461
88
31
→ More replies (4)68
2.7k
u/shelvac2 Jan 01 '23
I believe Slay the Spire was written in java
294
409
u/Velocityraptor28 Jan 01 '23 edited Jan 01 '23
oh was it?
(EDIT: why did this get 300 upvotes? i just asked a question? not that i dont appreciate it of course)
→ More replies (12)510
u/mrmurkee93 Jan 01 '23
Yep, STS is written in Java, you can see Java logs when running mod the spire version
→ More replies (1)→ More replies (9)85
u/Excellent_Bovine Jan 01 '23
For fellow egg enjoyers Slice and Dice is written in Java
→ More replies (13)
1.7k
u/Hairy-Wear-2064 Jan 01 '23
Project zomboid i think is entirely written in Java
183
334
u/Artimedias Jan 01 '23
there's a significant amount of LUA as well.
→ More replies (11)229
u/ThisIsJulian Jan 01 '23 edited Jan 01 '23
And C++ for certain performance intensive spots.
EDIT: Dog ate the "d" of the word "And".
→ More replies (21)→ More replies (19)6
1.0k
u/Leviticoh Jan 01 '23
Mindustry is fun
288
u/epicaglet Jan 01 '23
Yep mindustry is made using libgdx.
So anything on this list is also made with Java
→ More replies (2)127
u/Geolykt Jan 01 '23
Mindustry is not made with libGDX - at least not anymore. Instead it is made with Arc a pseudo-libGDX library using SDL instead of whatever libGDX uses (and as such what LWJGL uses since you are likely using the LWJGL backend)
→ More replies (12)→ More replies (13)38
420
u/Sindef Jan 01 '23
r/2007scape may not take this well
92
→ More replies (2)23
u/ApeCheeksClapper Jan 01 '23
They’re too busy grinding. As long as Settled doesn’t see this, we’re fine.
→ More replies (5)
515
u/laigunner03 Jan 01 '23
Starsector as far as I'm aware
161
38
22
17
u/Antilles34 Jan 01 '23
Running a lot of mods on it sort of shows how Starsector is great in spite of java, not because of it.
→ More replies (12)8
624
u/mintyque Jan 01 '23
A lot of old games for pre-smartphone phones (if not all of them) were made in Java, actually
70
u/T0biasCZE Jan 01 '23
android games/apps are also made in java (or sometimes kotlin)
→ More replies (4)281
u/XxXquicksc0p31337XxX Jan 01 '23
J2ME is the term you're looking for. Those games are actually better than most smartphone games nowadays
→ More replies (7)119
→ More replies (7)6
u/vatroslavj Jan 01 '23
Yea I remember having a touch screen phone without Android/iOS when I was like 10 or so, and downloaded a bunch of games on it somehow, still remember each one started with the coffee cup logo
364
u/riotinareasouthwest Jan 01 '23
Equillinox
110
→ More replies (1)44
1.4k
u/Robot_Graffiti Jan 01 '23
You can write an indie game in most languages, it's fine.
In the 90s you had to write the pixel loop in C/C++/assembly and not in BASIC. But now the pixels are drawn by the GPU. Also, modern JITed languages like Java are a little slower than C++, but not a thousand times slower like old interpreted languages were.
341
u/ExternalPanda Jan 01 '23
The major problem is not speed though, the JVM, like you said, is pretty fast. It's fighting against the GC, because you don't want a pretty heavy GC pass making your game choke, especially when something important, like the player being engaged in combat, is going on
→ More replies (52)→ More replies (17)218
Jan 01 '23
Is it possible? yes. is it efficient? no
→ More replies (41)516
u/Robot_Graffiti Jan 01 '23
Eh, using the wrong language has a linear speed cost, using the wrong algorithm can have an exponential speed cost. Your skill matters much more than the language you use.
→ More replies (99)
333
Jan 01 '23 edited Jan 01 '23
Minecraft inspired me to start with Java after using GameMaker years ago. Then I moved on to other languages/engines.
If it wasn't for Minecraft back in the day, I probably would've never tried to take the step to learn something else other than basic GameMaker scripting.
While I haven't used Java in a long time (or even played Minecraft), it definitely helped me to where I am now.
Sure, I haven't made more than 2k$ from my Java experiences, but it gave me a boost. And I can't be the only one who was introduced with Game Development using Java from Minecraft. Whether we still use it now or not. It definitely did good to some people, but it's not a thing you can measure, I believe, because it's not necessarily a game made in Java that is the end result.
143
u/Hakim_Bey Jan 01 '23
I know a fair deal of game devs who got started writing all kinds of mods and cheats for Minecraft. It's a badass platform to learn about game design.
→ More replies (4)61
u/TheRedmanCometh Jan 01 '23
Also the obfuscated code gets you a good eye for REing.
→ More replies (16)→ More replies (13)8
u/Delusional_Gamer Jan 01 '23
Same here. My love for programming stemmed from wanting to make a game in java. And this stemmed from finding out Minecraft was made in java
→ More replies (1)
64
36
u/jfmherokiller Jan 01 '23
if I remember correctly Spiral Knights was a java mmorpg game.
→ More replies (13)9
u/SuspecM Jan 01 '23
I'm actually surprised it's even remembered nowadays let alone mentioned here.
→ More replies (4)
247
u/akira_88 Jan 01 '23
Pretty much all the Android games before kotlin?
169
Jan 01 '23
I think the demanding games run mostly in native (C++, with NDK and Android Game SDK) and java is only the launching code.
→ More replies (3)55
u/TorumShardal Jan 01 '23
Pretty much all mobile games before iPhone and smartphone era?
→ More replies (2)9
28
24
u/lestofante Jan 01 '23
Vampire: The Masquerade – Redemption used Java at least for some parts
→ More replies (1)
19
13
u/purple_editor_ Jan 01 '23
Spiral Knights was a very performant 3D game published by Sega and written in Java back in 2012/2013
To this day I am mistified on how they did it
→ More replies (2)
65
Jan 01 '23 edited Jan 01 '23
I made one for a school project in 2019. It's a "Rock Paper Scissors Lizard Spock" game. Or doesn't this count?
p.s. we had to use Swing instead of JavaFX so the teacher didn't have to learn the new framework.
41
34
187
u/ske66 Jan 01 '23 edited Jan 01 '23
I'm not a Java developer. But I can't really see why using any OOP language over the other to make a game is a bad idea considering the fact that inheritence, abstraction, and polymorphism are the core of game design. Unity uses C# and both C# and Java are very similar in terms of syntax and order of operation
You new engineering students need to get more creative with your meme templates than;
COFFEE LANGUAGE BAD
107
u/chemolz9 Jan 01 '23
Theoretically there is no real reason to prefer one OOP language over another, not today at least. However, a key factor is the ecosystem. If it's uncommon to use a language for a certain field, then you will find a lot less libraries, frameworks, documentation aso. Which makes it a lot harder and ineffecient to develop.
However, game developement is a wide field and some kind of games might just as well be developed in Java as in C++.
→ More replies (3)14
u/Ulfgardleo Jan 01 '23
Vectorization and memory density is incredibly difficult with java. Games are a real time simulation with a potentially huge amount of objects. For the core loop you want your objects to lat least live in contiguous memory with as little indirections as possible.
→ More replies (2)7
Jan 01 '23
There are two reasons Java sucks for games
The first is there is no way to create something like a vector3 object without putting them on the heap.
The second is any gc hitch means a frame rate hitch. This means you can't do any heap allocation at runtime.
Combine these two and there is no efficient and convenient way to do 3d math without inlining everything to component variables.
To have some semblance of dynamic allocation you need to write your own memory management to have stacks of objects to re use and manually free them. At this point why are you using Java at all.
25
u/Merzant Jan 01 '23
Isn’t it because Java apps are executed by the Java Virtual Machine and that’s additional overhead? Java was built for portability rather than performance (as far as I understand anyway). No doubt things aren’t that simple anymore.
→ More replies (17)52
u/ElectricalRestNut Jan 01 '23
People overemphasize the VM. The bigger issue is the memory model where everything is on the heap and rather fragmented and garbage collection. This increases both linear performance and adds unpredictability. In C++ or even C# I could work with value types to improve locality and pools for more predictable allocation.
→ More replies (5)12
u/SomeDudeRelaxin Jan 01 '23
Currently developers are using data oriented design more than oop since cpu cycles are faster than memory access
→ More replies (8)→ More replies (6)4
u/SeroWriter Jan 01 '23
You're really going to ignore the god awful optimization of java?
The C++ (bedrock) version of Minecraft runs better on an $80 tablet than the Java version does on a high-end gaming pc.
82
19
18
u/VenkatPerla Jan 01 '23
Most games on symbian os if anyone remembers. Those old nokia and Samsung phones.
9
17
u/FieryXJoe Jan 01 '23
I do think minecraft does highlight one thing that makes java great for gaming. It may run (relatively) like ass but it is the most moddable game I have ever come across. Java's reflection lets code change other code during runtime. It is why a game with no intial modding support had such useful community modding tools. It is also why you can throw 400 mods into a game and 99% of the time it will just work. 20 different mods can change the same function and still all work with no compatibility patches.
11
u/alex2003super Jan 01 '23
It's so elegantly moddable that literally the entirety of the game is namespaced to
minecraft:so that mod content can exist right alongside it, on equal footing to Mojang code
29
8
21
20
7
6
u/Ultimate_Ghreak Jan 01 '23
Mobile phones back than had games played with java. I remember 2008 when I put Pokemon blue on my LG kp500 - it played awful :D
6
u/LieutenantNitwit Jan 01 '23
Puzzle Pirates was in Java a million years ago, I believe. It was pretty impressive from what I remember and I'm not Java's biggest fan. The networking capabilities is what impressed me. (chats, sending game events, blah blah blah)
→ More replies (1)
5
5
13
9
u/alexshakalenko Jan 01 '23
Literally every mobile game before Android and iOS came along was written in Java
→ More replies (2)
8
u/PassFlat2947 Jan 01 '23
There is limited list on wiki https://en.m.wikipedia.org/wiki/Category:Java_platform_games
→ More replies (1)
8
4
4
u/Radixeo Jan 01 '23
Hot take: I bet a lot of Minecraft's success can be attributed to the fact that it was written in Java. If it was written in C++ it would have never gotten as big as it did.
The reason? Since the javac compiler produces class files that contain most of the information from the original source file, it's much easier to decompile Java programs than it C++ programs. This ease of decompiling let the Minecraft modding scene quickly explode, which made for far more interesting youtube content, which boosted the game's popularity to astronomical levels.
4
3
3
3
3
3
u/JocabClonk Jan 01 '23
Idk if anyone knows this one but the Dan Ball powder game was ran in java.
→ More replies (4)
4
u/AdmiralKnusperbacke Jan 01 '23 edited Jan 01 '23
The first "The Binding of Isaac" is in Java, too
edit: my fault it is flash as a lot of people already said
→ More replies (3)
2
2
2
2
2
2
2
2
2
2
2
u/qnm Jan 01 '23
Back in the day (mid 2000s) most of the games on feature phones ran on J2ME. Some of them were even quite good.
But otherwise yeah, pretty much just Minecraft.
2
u/Fit-Scientist7138 Jan 01 '23
Wurm online which was actually a game notch worked on before Minecraft
2
Jan 01 '23
what’s funny to me is that lots of people blame MC’s poor performance on the language… it’s not the language’s fault. notch was just not expecting the game to go as far as it did, so it is not programmed particularly well
2
2
u/PossibleBit Jan 01 '23
Java also wasn't good in the classical sense for Minecraft. What did turn out to be a huge positive in this case was that the ease of decompiling Java class files and extending the class path made it so that the modding community had close to unprecedented ability to work with even the most integral parts of the game (something you wouldn't generally see outside fully open source games)
2
u/makingthematrix Jan 01 '23
Games made with LibGDX game engine: https://libgdx.com/showcase/
Games made with jMonkeyEngine: https://jmonkeyengine.org/tags/showcase/
These are two the most popular game engines for JVM. Sure, they are used for indie games. But. And hear me out here :) The progress in software development is such that every few years the amount of work needed to create a given app halves - you need half of time, or half of the team to do the same thing. And JVM develops like crazy these days: new Java releases, Scala 3, Kotlin, GraalmVM Native Image, all the new solutions for backends, JavaFX getting some love again...
Yes, it's all slower than C++, but that is an issue only for blockbuster games with flawless 3D graphics and amezeballs special effects. It's not the only type of games out there. There's a lot of interest in retro games, there are real time and turn-based strategies, and there are simple casual games that can make a lot of revenue. For them, JVM is a perfect environment.
2
u/HorizonBaker Jan 01 '23
It's one hell of a game though. Counts for something that it's the most popular game of all time.
2
2
2
2
u/Bumpkin_Pi Jan 01 '23
Mindustry is a pretty good indie game writen in Java, the code is quite nice to work with to (it's also open source which is awesome)
2
2
u/kerpetenkelebek Jan 01 '23
If you’re old enough, you would remember the days when all mobile games are developed in java
2
2
u/Kapten-N Jan 01 '23
It's fitting that he points to piles of garbage. Not because Minecraft is garbage, but because Java is crap for games.
2
u/donorak7 Jan 01 '23
I mean minecraft is a damn good example of good execution using Java for gaming. But honestly its not versatile enough
2
u/Cart0gan Jan 01 '23
Java's main benefit is that it's easier to reuse code across different platforms when it runs in a VM. So what did Mojang do? They rewrote the whole game in a different language, of course.
2
2
2
u/cheeb_miester Jan 01 '23
pixel dungeon was written in java https://github.com/watabou/pixel-dungeon
2
2
2
u/chloro9001 Jan 01 '23
I would argue that it is good. Anything that makes it easier for the indie. C# is glorified Java anyways.
2
2
2
2
u/ThGaloot Jan 01 '23
There is the Java Lightweight Game Engine project that is used to create LibGDX, JMonkeyEngine, and a few newer engines like KorGE (Kotlin game engine that uses coroutines and can compile to native). You can also take majority of Java projects and put them through GraalVM to create a native binary instead of relying on a JVM.
The technology is there and can be used to create a well optimized game, but most Java developers stick to server and mobile development. C languages (C, C++, C#) have always been the go to for game development, but a lot of engines have matured to a point of using a scripting language for majority of development and a C language for optimization.
I could see a migration over time to a Java language or python (Godot's influence) because Unity seems to be making distasteful choices. Most C# game Dev comes from Unity (CryEngine if you like crying 😭).
I would like to see more movement towards Rust for that performance development and memory safety. From my experience with Rust and C bindings for Godot, the development was pretty smooth. Even smoother than C++.
2
u/Reasonable_Flower_72 Jan 01 '23
Long time ago, in pre-smartohone era, there was few enjoyable Java games for these days called "dumbphones"
2
u/Quacky1k Jan 01 '23
Correct me if I’m wrong but I believe the original binding of Isaac was written in Java
2
u/im_bop34 Jan 01 '23
Java is one of the worst parts about minecraft, as it has horrible performance.
2
u/TzedekTirdof Jan 01 '23
There were some online games but most of them got replaced with flash, which was more flexible and had specific popular outlets like newgrounds and that other one. But now flash itself has now been deprecated.
2
2
2
u/Pradfanne Jan 01 '23
Look, I prefer Java Edition as much as the next guy, but we have to admit, it runs like absolute shit
2
u/XxIneedheadphonesxX Jan 01 '23
This is implying that minecraft runs good on java and isn't limited by its engine
2
2
2
u/PPX777 Jan 02 '23
Chrome. its a java-based first person shooter RPG video game on steam. (NO NOT the google web browser)
2
2
2
Jan 02 '23
You can build some pretty good looking games in Java actually. LWJGL is "Lightweight Java Game Library" - which allows you to write games in OpenGL with Java. There are plenty of nice games built out of it. Such as the YouTuber "ThinMatrix".
Minecraft and RuneScape (2007) are some of the popular ones full Java games, but you should also keep in mind quite a lot of multiplayer games' backends are written in Java. MMORPGs like Star Wars Galaxies, and so on.
3
u/MrBones2005 Jan 01 '23
Runescape, Saints row 2, tetris, pong, assasins Creed, COD world át war Plants vs zombies, space invaders, angey birds, minekeeper, snake.
3
u/TheMoonDawg Jan 01 '23
It was so good that they rewrote the entire game into C++ for bedrock edition to slowly phase out the Java version!!! Wait…
2
u/Solarwinds-123 Jan 01 '23
3 Billion devices run Java.
We're sorry.
(I'm pretty sure I owe Oracle a license fee for this joke)
1
u/ThunderShiba134 Jan 01 '23
What about Python?
8
u/Mojert Jan 01 '23
A lot of visual novels are written using Ren'Py. Now whether you consider them games or not is up to you. (And until June 2022, it only supported Python 2 🤢)
5
u/brotalnia Jan 01 '23
There is an open source server emulator for the original WoW Alpha written in Python. That's the only game related thing i can think of atm.
4
3
u/EvadesBans Jan 01 '23
PyGame was the worst gamedev experience I've ever had from a library that was even remotely popular.
2
2
→ More replies (1)2
Jan 01 '23
https://en.m.wikipedia.org/wiki/List_of_Python_software
A lot of good games, however python is a slower alternative to rendering graphics compared to c++ with dx
→ More replies (4)
1
u/kana0011 Jan 01 '23
Minecraft, Project Zomboid, Runescape, older versions of FIFA, first version of SimCity, SF2?
→ More replies (1)4
-3
u/Cephell Jan 01 '23
And Minecraft suffered dearly for this decision. Even to this day.
→ More replies (3)6
u/mcmahoniel Jan 01 '23
Minecraft exists today because of that decision. The cross-platform nature of the JVM meant that just about anyone could pick it up and play. And most importantly, the modding scene – enabled by the ease of decompilation – made the game infinitely extensible.
0
Jan 01 '23
[deleted]
11
u/Hakim_Bey Jan 01 '23
It gets better FPS but it achieves this by randomly dropping AI or redstone ticks. I wouldn't exactly call that "running better"
56
u/sigmaclientwastaken Jan 01 '23
they did not drop java
bedrock is a buggy mess
optimized java still runs faster
29
u/Implement_Necessary Jan 01 '23
I'm sure Java Edition without optimization mods would run faster if they actually used new versions of OpenGL instead of one from 2010...
19
u/sigmaclientwastaken Jan 01 '23
recent Minecraft versions use slightly newer versions (like lwjgl3), so there is some improvement
→ More replies (7)14
Jan 01 '23
Not really. While it is buggy af, bedrock does run way better than java even with sodium,starlight and lithium/optifine. (coming from a laptop user)
→ More replies (2)4
u/Amazing-Cicada5536 Jan 01 '23
The dropped Java and like 90% of the features. Hell, if you remove blocks and make everything static it will run like 10000x as fast.
Also, a rewrite is almost always faster regardless of language, since they get to know the problem at hand to begin with. Plus Minecraft has a famously shitty code base.
→ More replies (1)3
u/calcopiritus Jan 01 '23
It runs better but changes how the game works. For example its "simulation distance" is much lower than the render distance, so you can render further. In Minecraft that simulation distance is very important, and it's also important to see where it is, so making it be further than render distance is annoying.
It also renders transparent blocks as opaque when they're not so close.
Not only they rewrote in C++ but also made a bunch of optimizations, so I wouldn't use that to compare languages. It also runs a lot better than 65%.
I get more than double the render distance with more fps (and more stable) with no GC stuttering. And double render distance is way more than double the performance.
→ More replies (2)8
98
Jan 01 '23
[removed] — view removed comment
62
28
u/WJMazepas Jan 01 '23
IIRC, there's lots of Mods that can increase the performance of Minecraft Java version. So yeah, the bad code base part is true
6
→ More replies (6)2
u/god_retribution Jan 01 '23
not only single thread
opengl render is biggest issues that minecraft have
→ More replies (1)
-1
Jan 01 '23
[removed] — view removed comment
16
u/Hakim_Bey Jan 01 '23
The Java version is still the superior one. They made the C++ version to court the mobile and low spec console markets, not to fix any issue with the Java version. And they had to dumb it down considerably, which is why you'll never see a technical player run anything other than the Java version.
Considering what happens under the hood, the Java version runs like a fucking beast. The meme that it is badly optimized only comes from people who don't know jack shit.
6
u/EvadesBans Jan 01 '23
Mentioned this elsewhere in the thread but my older PC's 1080Ti will barely even spin up the fans running Minecraft in VR. The Java version runs far better than it has any right to, so yeah, agreed.
4
u/Hakim_Bey Jan 01 '23
Yeah people see cubes and think "lol dumb pixel game". They fail to realize the game has dynamic lighting, physics engine, tons of AI and mechanics etc... moreso than most high end game where everything is pre baked...
And it all runs single thread on a potato. Not bad at all for an unoptimized game
2
u/NOTtheNerevarine Jan 01 '23
Java is the superior one IMV, but not because of performance. Minecraft Java Edition might run well now, but it has had several rewrites to get there. The original code for Minecraft was pretty messy and bad. The success of Minecraft came from the community who was providing mods and feedback which were incorporated in the game, such as pistons, which were originally a community mod by Hippoplatimus.
1
Jan 01 '23
Java is good for mods and red stone. If that makes it superior in your mind then so be it but for casual minecraft players bedrock is great. I've played minecraft over a decade and if I had to choose I'd just go with bedrock. Controller support out of the box is solid but most important is the fact that I can be playing on pc, my sister can use her phone, and nephew can use his tablet and we can all play on the same server (Lan) with literally 0 set up. Java isn't so bad in that end either with Lan set up, but if you only have one pc your options become limited. We did multimc for a bit but even that got complicated when we all wanted to use controllers.
6
u/Hakim_Bey Jan 01 '23
Well all mechanics will be more "correct" and consistent, so that means redstone but also spawning, light levels, entity AIs, etc...
That being said I'd never disparage bedrock, it has very legitimate use cases and is very good at what it does. I wouldn't call it bugrock, that's as stupid a meme as calling Java unoptimized.
People who clown on either just show they don't know shit.
5
u/LeMads Jan 01 '23
Before Minecraft he had a job at King, making games. So he knew other technologies.
→ More replies (1)-2
8.5k
u/FurrAndLoaving Jan 01 '23
RuneScape is the only other popular one I can think of