Is Java still something one should program games in?

Feb 11, 2023 at 7:29 PM
Neophyte Member
"Fresh from the Bakery"
Join Date: Feb 11, 2023
Location: The Digi-Space
Posts: 3
Age: 19
Pronouns: he/him
Mostly asking since I mean, you can't make Applets that run in web browsers anymore (Sort of.), and im unsure if someone would actually play a .jar based program, or just delete it or something.
 
Feb 11, 2023 at 11:00 PM
Junior Member
"Fresh from the Bakery"
Join Date: Jan 3, 2013
Location:
Posts: 16
Pronouns: he/him
To be perfectly honest, I think Java is not something you should program anything in at all. :P

But I feel your pain, I managed to learn ActionScript and even published a game in it just before Flash has died.

To take your question more seriously, if you've already far into a project in Java, then finish it. If you package it nicely, people may still play it – if you think about it, people still play Java games, think about Minecraft. But if you're just about to start something, I'd definitely recommend something else. In case you want your game to be playable in the browser, consider HTML5 + JavaScript or WebAssembly. There are even some nice game engines so you don't have to start from scratch, I tried Phaser (JS) and it's quite capable. In case your game is supposed to be downloaded and played directly, then you can use game engines like Unity (though I don't have experience with it), or use programming languages like Python or C++ (game engines exist for these languages). I recently got into Rust and I think it's the programming language of the future: it's memory safe, performant, doesn't have an ugly garbage collector, and supports a variety of platforms (including WASM, so it's actually great for web development also); the only drawback is that there are no fleshed out game engines as of yet (though you can still try Bevy), and it's only recommended if you already have great experience with programming, including system programming languages, because it introduces some new concepts like lifetimes those only make sense if you know about the possible pitfalls of memory management it is protecting you from.
 
Feb 12, 2023 at 12:46 AM
Neophyte Member
"Fresh from the Bakery"
Join Date: Feb 11, 2023
Location: The Digi-Space
Posts: 3
Age: 19
Pronouns: he/him
To be perfectly honest, I think Java is not something you should program anything in at all. :p

But I feel your pain, I managed to learn ActionScript and even published a game in it just before Flash has died.

To take your question more seriously, if you've already far into a project in Java, then finish it. If you package it nicely, people may still play it – if you think about it, people still play Java games, think about Minecraft. But if you're just about to start something, I'd definitely recommend something else. In case you want your game to be playable in the browser, consider HTML5 + JavaScript or WebAssembly. There are even some nice game engines so you don't have to start from scratch, I tried Phaser (JS) and it's quite capable. In case your game is supposed to be downloaded and played directly, then you can use game engines like Unity (though I don't have experience with it), or use programming languages like Python or C++ (game engines exist for these languages). I recently got into Rust and I think it's the programming language of the future: it's memory safe, performant, doesn't have an ugly garbage collector, and supports a variety of platforms (including WASM, so it's actually great for web development also); the only drawback is that there are no fleshed out game engines as of yet (though you can still try Bevy), and it's only recommended if you already have great experience with programming, including system programming languages, because it introduces some new concepts like lifetimes those only make sense if you know about the possible pitfalls of memory management it is protecting you from.
For me, LWJGL2 + Java is easier to program in than C++ + freeglut/anything else.
 
Feb 15, 2023 at 1:45 AM
Junior Member
"Fresh from the Bakery"
Join Date: Dec 31, 2015
Location:
Posts: 10
Pronouns: he/him
You can program games in any language you want. Java is a fine language to use, especially if that's the one you're most familiar with.

Unless you're looking to learn a new language, or you have some super tight performance constraints (unlikely), if you're thinking of doing it in Java, do it in Java.
 
Feb 15, 2023 at 5:37 AM
Life keeps going, but my temper doesn't.
"..."
Join Date: Aug 12, 2013
Location:
Posts: 383
Pronouns: he/him
To be perfectly honest, I think Java is not something you should program anything in at all. :p

I love Minecraft to death but I wish Notch preferred a different language at the time. That said I also dislike many applets that do Java. But as tmz says do what you're MOST COMFORTABLE in because you don't want to waste too much time learning another language and feeling like you're not doing progress. If you end up not liking Java in the future you can take what you have and make a personal challenge to port it in another language.
 
Back
Top