Where to start? Which library should i use?

Hi all,

First of all, im new in this forum and im almost new in java programming enviroment (I studied Java 3 years ago but I main PHP nowadays).

I decided to start a new project in Java (the most difficult part will be syntaxis, I know all about OOP etc) and I want to make a game, at least, a simple game.

So I googled and i found some libraries to work with graphics (make games) in Java and I was wondering which is the best for me, or better, which should I use. In addittion, I expect to make my game in 2D (maybe a card game or something like that).

Finally, I would like to try make something online, but this will be another independet library I think.

Thanks in advance guys and nice to meet you all!

PS. Sorry for my English, still improving it!

Graphics2D and a JPanel or Canvas is fun to code.

https://www.processing.org/ is doodle-fun.

I wouldn’t start with openGL directly.

if this is your first project I would recommend that you start with something simple like a text based game ,just so that you get used to use things such as loops and hos to effectively manage input , after this do what you want to , probably something simple until you are confident with the library however a good starting point (if you want to become good at it quickly) is to use LWJGL , using the simpler classes of opengl, look up tutorials and learn how to use it. Lwjgl is also good because it can handle all the inputs to your game. If you just wanted to get used to java you can use the Graphics object with buffered images , there are more tutorials than I can count for doing this.

Depending on what you want to achieve:-

  • Learning how to code games from scratch: LWJGL or JogAMP
  • Just making some games painlessly and fairly quickly: libgdx, jpct, jmonkeyengine

Cas :slight_smile:

Hi

Please don’t create yet another library except for purely pedagogical purposes (to learn). There are already tons of libraries and I really think that a consolidation of Java ecosystem on fewer libraries would be better than effort duplication and “not invented here” anti-pattern. princec already indicated you some nice libraries that you can use. JogAmp’s Ardor3D Continuation is worth a try too but you should start a very simple project, preferably not in 3D, even without graphics. If you try to do something too difficult for a newbie, you’ll get discouraged and you’ll give up.

Yeah, I think you misunderstood me, no problem. I tried to say that I will try to make my game online (in a very faaar future), so I was saying i would need another library. Anyway, I’ll never create another network library (Could costs me years…).

Thanks guys for your answers. Since I do not hurry and I want to learn the basics and the deepness I think I will try “LWJGL”.

This is my last concern :slight_smile: But I will try my best. If not, I will down the level of my project.

Step by step.

Thanks guys!

Haha, such thing does not exists.

But yeah, I’ll vote for libGDX.

Before you get confused by how LWJGL works know that you really need to learn OpenGL, not LWJGL; LWJGL is just a bare wrapper over OpenGL.

Cas :slight_smile:

I read about all of this and definitely I’ll try libgdx. As i can see is a high-level library and things will be easier and better (And i found some books to starting).

Maybe in a future i will try the world of LWJGL,openGL and C++ :stuck_out_tongue:

Thank you guys!

There is also a book about libGDX game development. It could be useful to read it while making your first game.