What library should I work with?(if any at all?)

Hi. My name is Garuten, nice to meet you :).

I’ve been learning java for a while now. Just the basics really. So one day I decided I wanted to start learning game programming and I made myself a list of games to program just to start learning the very basics.

Last thing I made was a pac-man game in swing and awt and it turned out pretty well. I can see, however, that there must be libraries that make doing some of the stuff easier. For example, I wanted pac-man to start doing epilepsy-inducing flashing whenever he got one of those power balls, but I couldn’t figure out with my current tools how to do it without having to repaint every single sprite of a different colour.

Anyway, next in the list is The Legend of Zelda. I’m really getting into this thing, and I’d really like for my next game to have some awesome stuff, but I’m not sure whether I should use a library or stick with swing and awt.

I know of Slick2d, LibGDX and LWJGL. I researched, and found out that Slick2d is pretty outdated and not updated very often, so I scratched it off my list.

Next up was LibGDX that seems to be pretty popular, but as soon as I decided to set it up I saw that you had to set things up for android and iOS and other things and I was like WHOA CALM DOWN, I just want to make a simple 2d game…

Then I tried to start learning LWJGL, and I kind of got the setting up… but then the whole business of VAO VBO (I don’t understand what a Buffer even is…), shaders, quads etc… all seemed a bit overwhelming. Most tutorials are pretty bad too, and to make things worse, they added the implementation of this thing called GWFL recently and with that many things changed in LWJGL, so most tutorials are outdated and that makes me even more confused…

So in the end TL,DR: I want to make a Legend Of Zelda-like game mostly to continue my learning of game programming. Should I make the effort of learning a library? Or should I just stick with swing until I start to aim higher?

You don’t have to set up iOS/Android stuff for LibGDX, you just have the option to. You can ignore all that if you’d like. When using Gradle, simply untick the iOS and Android options. I would recommend using LibGDX if you don’t want to get to into OpenGL with LWJGL.

Slick2D is getting pretty old now yeah, but is still viable. For example, Rayvolution’s Retro-Pixel Castles uses a (modified?) version of Slick2D. However, LibGDX can do pretty much everything notable that Slick2D can and more.

+1 for slick2d, if you want to do a simple 2d games, why don’t use it ? Try to do a small game with it and then move to libgdx. My2cents

If you want to do a simple 2D game I would also recommend Slick2D. It’s a good starting point.
For more advanced stuff you should use LibGDX or the jMonkeyEngine.
If you want to have full control over your graphics, audio and other low-level stuff (e.g. writing your own Game Engine), you should stick to LWJGL 3.

Hope that helps :wink:

It took me 2-3 weeks to learn Java, after which I started making server plugins for Minecraft. Yeah, I used to be a Minecraft fanatic, but not so much now. After I got bored of making server plugins, I started to learn JavaFX. I made a couple of simple games and I moved to OpenGL (LWJGL). I learned loads, because I could find the right tutorials.

You’ve got to find the right tutorials and resources. You can’t just click on all the links that are relevant. I recommend learning OpenGL development from ThinMatrix and learnopengl.com

OpenGL is worth learning. It’s a low-level industry-standard graphics API, and it can be tricky for beginners to use. Once you get the hang of it, it just becomes a little tedious, but nothing more than that. Most cross-platform applications use OpenGL for graphics, so it’s definitely something you should consider learning to use. But if you don’t want to, that’s fine.

Regarding which library you should use: just use whatever you think suits your needs. Then learn it properly. You’ve got to make sure you understand every single thing, no matter how boring it may be. It’s not so much about the library you use than the amount of dedication and persistence that you have when it comes to learning. Keep that in mind :slight_smile:

Also, it’s GLFW, not GWFL :stuck_out_tongue:

Hey guys, thanks a lot for the quick replies, I really appreciate them.

I think I’m going to give Slick2d a try. I’ll eventually want to move to LWJGL, since I gathered from what you guys wrote, that it is the library that gives you the highest control over the core stuff, and that’s what I like. I’m not to much into black boxes.

Anyway, thanks again for the replies. Once I get stuff going, I’m going to report my accomplishments :wink:

[quote]Also, it’s GLFW, not GWFL Tongue
[/quote]
Ooooohhhhh, so that’s why I had so many compile errors!!

JavaFX in its current form is relatively new, so I think there are more than a few people here who are substantially invested in LibGDX, LWJGL, even Java2D that haven’t truly given it a proper go. I was encouraged to try it anyway when princec, the original author of LWJGL, gave it a thumbs up as viable and interesting.

It supports a lot of special graphical effects, and it is definitely easier to learn and use than Java2D, as well as much more powerful in most regards. Unlike the earlier iteration of JavaFX, the code looks and reads like Java rather than like a separate language that has been tacked on. One of my discomforts with LibGDX has been that between its API (mostly good but not as deeply designed and polished as Java or JavaFX) and the difficulties of making OpenGL work, I found the learning curve to be steep.

JavaFX is not so great a choice if you want to make Android or iOS games, though. And there is not as much support, it seems, for game programmers, as of yet. Not a lot of tutorials made with game programming in mind.

I’m not the best one to be giving advice on this matter, because, at best I’m a noob at programming / game development.

I am better with c++ still, but I’ve found libgdx quite useful, in that (once you know how it works, and all that, it is quite powerful and makes things very easy for making something that will work on windows, linux, mac, and android with very little changes.

I’m not trashing slick2d or anything else, because I never used anything else but c++ with an engine that I started making on my own, until I realized that I would need to re-learn java in order to start making android apps / games.

One thing, as you setup libgdx, you do get to decide what you are going to be targeting, but unless you have or are on a mac, you can just uncheck the ios box. Also, as you start making your game, its a relatively simple matter (after the first time) to test your game on an android device.

Now, before you make the same mistakes I did, start small… something like zelda will quickly become overwhelming. So, I would recommend, whichever system you start with, start small… you don’t want to end up like my struggles have been, where I made a few simple games and then jumped up to something that my ego thought I could handle, but my skills were not there yet… now, I find myself taking days or weeks to get to the next stage (mind you, I have only about 5-10 hours per week that I can really dedicate to progressing).

But, I have to agree with phifrei, libgdx does have a bit of a steep learning curve, particularly in some areas that are not very well documented… just know that if you are going from pac-man to legend of zelda (snes), that is actually something of a leap.

If I were to make a more UI-centric 2D game today, I’d start with JavaFX I think, though I’d be doing a few performance tests to see how fast it can do certain things (it’s usually pretty performant… but I keep coming across awkward cases). I have no interest in touchscreen formats, only Steam deployment, for such a game.

Were I to make another arcade game I’d still use my own libraries on top of LWJGL.

Cas :slight_smile: