for the previous last days i was wondering what is the "right" way to start making games with Java, i've tried Java2D, i made some little examples with it and then decided to start learning Lwjgl, i kinda managed to go through the basics, i created my first pong 2 days ago, and now am trying to start a small platformer game, i have created few classes that will make the job a little more "Java2Disme" for me i recreated methods like drawRect,fillRect,intersects and setColor but using openGL and not Java Graphics2D so the drawing task will be a lot easier than rewriting every time many lines to draw a Quad with openGL, and actually everything was going "fine" until i saw this post and everytime i saw a davedes reply about this matters, it always make me think again about choosing LWJGL or LIBGDX, specially these kinds of phrase

Quote

LWJGL isn't necessary unless you want to go "low level" for some reason, and spend many months basically re-writing what LibGDX already provides for you.

does this mean that am gonna spend many months, just playing around with lwjgl and never finish any project ??i honestly don't want that ... and based on that you may say that i already answered my question, if i don't want this then i should stick with lbgdx, but the thing is, somehow i found lwjgl "easiest" than lbgdx, not the exact meaning of the word easy, but... i dunno ... it's friendly seriously, i just had to read the main wiki and that's it, i made a few test examples and a small pong and now like i said am starting a platformer and feeling + because of the classes i made to do the painting but with libGdx it's kinda different story, first all the errors that comes with it FROM NO WHERE i follow the documentation, the tutorials, but never had the same result, it always have an error and second, i just don't feel good working with it, it make me feel like am cheating, and "me no do that "

soooo guys ... any suggestion ?? by the way : if what davedes said about spending many months just playing around with openGL, then i'll definitely have to try again with libGdx, but here i want to clarify something, am sure that even with libGdx making a good game will last for months, but according to davedes , with lwjgl you will spend months making your game + many months learning about low level stuff, is that 100% true ??

thank you very much

"It's not at all important to get it right the first time. It's vitally important to get it right the last time."

I'm also starting out with game development using Java, and had no idea what libgdxwas when I jumped into LWJGL.

Thankfully, the people here pointed me in the direction of libgdx, I took a look at it, and was amazed at how seemingly powerful a framework it is. So I stopped using LWJGL and started reading up on libgdx instead.

I've been working with libgdxonly for the past few days, but I can already feel the difference. A lot of the "heavy lifting" so to speak, has been taken care of by libgdx. It's easier but still powerful.

Unless you are very skilled and experienced in both game development and opengl. And even then it would take longer with lwjgl. So it's only worth it if you are skilled, know what you can accomplish without libgdx more flexible and you are sure that you need it, and it would be too hard with libgdx.

Also if you happen to have a lot of legacy opengl code lying around...

Personally I learnt it the "hard way" (On purpose). I knew all the time that there were libraries like libgdx, but I felt that it was pointless to use it without understanding at least on a basic level what was going on under the hood. Unfortunately OpenGl doesn't have a basic level so I just kept using LWJGL straight up and do not regret it for a second. As far as I'm concerned I'm far more knowledgeable on a huge number of topics (not just graphics) that I simply would never have achieved using a library like libgdx. To be clear however, I think libgdx is an excellent api.

As I already explained here, it depends on how deep you want to go on the long term. If you feel able to use any low level OpenGL binding and if you really want to understand what happens under the hood, you can go on using OpenGL and switch to LibGDX later. The things you'll learn with a low level OpenGL binding will be useful when using an higher level API anyway. I agree with quew8 and I did almost the same, I used another binding for the OpenGL API for years and it helped me a lot to understand how to use JMonkeyEngine, Xith3D, Ardor3D, ...

Learning how to use LWJGL and writing boilerplate code is portrayed to be way harder than it really is.I started using LWJGL 5-6 months after picking up game programming.

My first few goes with lwjgl were not games. They were just me learning the basics.First I made a top down game where you could move a player around a 3D world (rendered as 2D. Sort of like kevglass' pseudo-voxel game) It just used immediate mode. But I learnt how to load textures.Second, a few weeks after picking up LWJGL, I made a voxel engine. It was terrible. But at least it worked, and I learnt how to use VBOs.

Long story short, I've been using LWJGL for almost a year.In that time I've created (and am still creating) Far From Home, The Gift/Curse of Evolution, Guardian I & II, Lord of Corruption, The 'Hex Prism Engine', and The Architect. (3 Complete, 2 abandoned, 2 WIP)Yes, I'm still writing some boilerplate code, but that hasn't stopped me from programming games. I write code as I need it.

Learning how to use LWJGL and writing boilerplate code is portrayed to be way harder than it really is.

i thought EXACTLY the same thing last night, i always heard about how hard lwjgl is and all those kind of thing, i thought like it would take me a week to just learn how to draw a rectangle, but i didn't feel that at all, in fact it was a LOT more friendly than LibGdx (maybe because of the strong and right written wiki of lwjgl) so yup, Challenge Accepted am going to stick with lwjgl, so beware a massive newbies question coming on the way

thank you all

"It's not at all important to get it right the first time. It's vitally important to get it right the last time."

...I have only used LWJGL bindings to opengl so I can only comment on that. It is very easy to setup a display and get a few things to show up. But once you get passed glBegin/glEnd stuff, that is where it becomes very difficult. Opengl is not glbegin/glend. There is much much more. I thought all was good until I ventured into VBO/VAO/shaders which is where ugly things can happen. And I still have not yet tried much more then a cube in 3D. Most people don't do much more then voxel works because it is so damn hard. (not to mention find some form of artist to make stuff for you)

Most nooby programers do not like libgdx because it is a shit storm to get setup. Even with the GUI to do it for you it is still confusing with all the xml/json/file directories you have to manage. I think that this is probably the biggest issue noobs run into when using libgdx. There is cliff in front of them and all the hand holds involve some other coding like language. (scene2D to say the least) There is also very little documentation on how to get more then the bare minimum done.

Even with that, I still think it is better to start with libgdx if you want to make GAMES. If you would like tinker and do some GFX programing then no, not libgdx. HerosGraveDev would have done a whole lot more if he/she (he right?) was using libGDX as he would not have to write say a spritebatcher, or wrapper for shaders, or a texture loader, or etc etc etc.

TL:DR : go libGDX for making games and OpenGL bindings to make cool effects.

@StumpyStrustdo i need more than glbegin/glend to do a 2D game i mean what else would i need except drawing squares,circles,line,points and loading imagesyou may say that if am only gonna use openGL just for that then it's better to do it with libGdx and i will not even have to "waste" my time with glbegin/glend , but just like you said, getting started with libGdx is the most shi*ty part, there isn't enough resources or tutorials even the documentation is not good enough.So since all what i want to do is in 2D, and, i found lwjgl more "easy" and a lot more friendly than libGdx, why should i change it ? why i have to use libGdx ? and when i think about it, when people with more experience then me said

Quote

if you want to make games use libGdx but if you want to do more advanced and complicated and all those zip-zap-zapati-pup graphic programming stuff, then you should use lwjgl

isn't this like setting us (noobs) in the wrong way ?? of course i don't mean that you are doing it in purpose but according to all the reply i saw in these matters, the correct thing to say would be : ------------if you want to create games in the fastest amount of time AFTER being familiar with libGdx, then you should use that onebut,if you want to create games AND learn more advanced graphic programming so one day you will be able to create awesome effects for your games, then you should start learning lwjgl, KNOWING that getting started with lwjgl isn't that much hard and KEEP IN MIND that you don't have to go so deep in openGl to be able to create a simple 2D game------------so supposing that what i said now is right, i would definitely start learning lwjgl as fast as i could (i am )please correct me if i said something wrong

thank you

"It's not at all important to get it right the first time. It's vitally important to get it right the last time."

If you would like tinker and do some GFX programing then no, not libgdx.

Tinkering and GFX programming is an important part of making games.

Quote

HeroesGraveDev would have done a whole lot more if he/she was using libGDX...

My definition of "done more" is different to yours.I want to not just make games, but know how everything works behind the game, and be able to help other people with pure LWJGL.Therefore, IMO, I have achieved more than if I used LibGDX.AND I have bragging rights to say I coded from just the OpenGL Wrapper. (Nobody dare even think about mentioning machine code I want to know how things work AND make games. That means I need to have some balance)

Quote

... as he would not have to write say a spritebatcher, or wrapper for shaders, or a texture loader, or etc etc etc.

Libgdx also has a bunch of stuff already made for you that is not so trivial. If you need to ask what, then just look at the source and be wowed. The point of I am making is that making a game takes long enough to if you just want to make a game, then don't reinvent everything.

All of the people on here spouting the "I want to understand what is going on" need to understand that you can know what is going on under the hood without creating that which is under the hood. OpenGL is actually I high level API when you look at it from assembly or machine language but we consider it low level. I know what OpenGL is doing when I call glBegin but I am not writing the driver calls from scratch or even the driver itself. If I wrote my own driver for my graphics card does that really give me bragging rights or make me super leet? No, I just like shooting myself in the foot or making a wheel that has only 6 vertices.

@HeroesGraveDone more is meant as how much you did for game development. You probably would have made many more games if you used libgdx.

I personally love tinkering and GFX programming as you can tell from what I post but neither are a game. They are part of a game but not one by themselves.

@alaslipknotYes, very much so. Libgdx itself is not hard to use and really streamlines things if you know what it is streamlining. (and set it up properly) In order to know you do not have to code your own version of what libgdx does but read up on what it is doing. I say move on to libgdx now as you can learn opengl while learning libgdx.

Let me change things. Start with LWJGL and goof off for a while. Then when you want to get serious, use libgdx.

LWJGL is not that hard if all you are doing is rendering cubes or textures with fixed-function immediate mode (glVertex, glOrtho, glTranslate, etc). This is how it was done in 1991 -- these techniques are now deprecated. If you want to continue using the fixed-function API, you are not really learning anything useful IMHO.

If you are going to "learn OpenGL" (and thus graphics programming) you should be working with 21st century OpenGL: this means working with matrices, shaders, VBOs, batching, etc. These concepts are not that difficult to learn (my tutorials should be enough to get you comfortable with GLSL). The hard part is writing the boilerplate, debugging GL issues, understanding the math, and putting everything together.

To demonstrate the difference, here is how easy shader compilation is in LibGDX:

If you just want something to draw 2D rectangles, PNGs, text, and work with render-to-texture, you can use lwjgl-basics, which is more minimal than LibGDX. It will be much more performant and more powerful than glBegin/glEnd. See examples here and here, and a few tests here.

But nobody can tell you which framework or library to choose. You should try them both out and make a simple game, like Pong or Tic-Tac-Toe, and decide for yourself which is better suited to your interested and goals.

If new person comes to the forum and says they want to use 'pure' LWJGL, then don't scream at them to use LibGDX.If they say they don't want to use 'pure' LWJGL, by all means, scream.If they ask which one to use, tell them to work it out themselves. Then they'll pick what's best for them.

If new person comes to the forum and says they want to use 'pure' LWJGL, then don't scream at them to use LibGDX.If they say they don't want to use 'pure' LWJGL, by all means, scream.If they ask which one to use, tell them to work it out themselves. Then they'll pick what's best for them.

>if they're "new" they may not know of libgdx/other options and may not be fully aware of what the other options are capable of. That's why we inform them.

Btw, fixed function is still used on some consoles so learning it would not be a waste. IMHO.

Some people who come here from other languages (and had made complete games) most likely have a working opengl framework they coded themselves and porting it to another language should be trivial at best(though) I must admit lwjgl does not always conform to the standard opengl prototypes)

Well yeah but I would think that whether you're for LWJGL or for LIBGDX, one would advocate the importance of a budding game developer being equally well-informed about both approaches so that they could make the choice on their own (and not to push that newbie too much in the direction that you advocate)

OK, everybody, let's just stop this argument. If you want to do LWJGL, then fine, do it with that. If LibGDX, then do it with that. It doesn't matter what you use. There is no reason why we should continue this argument. The OP can decide for his/herself.

OK, everybody, let's just stop this argument. If you want to do LWJGL, then fine, do it with that. If LibGDX, then do it with that. It doesn't matter what you use. There is no reason why we should continue this argument. The OP can decide for his/herself.

Unless the argument is solved, it will just pop up in another thread later.

OK, everybody, let's just stop this argument. If you want to do LWJGL, then fine, do it with that. If LibGDX, then do it with that. It doesn't matter what you use. There is no reason why we should continue this argument. The OP can decide for his/herself.

Unless the argument is solved, it will just pop up in another thread later.

Unless the argument is solved, it will just pop up in another thread later.

I don't think it's an argument that can be resolved or has a correct answer though, so people should just be prepared to discuss it over and over if they're inclined to do so.

Like what was said above: "If you want to do LWJGL, then fine, do it with that. If LibGDX, then do it with that. It doesn't matter what you use."

Whatever suits one's goal, I guess. At the very least, one should strive to be well-informed about both approaches before deciding, and those more knowledgeable about the topic should help those that need help to that end.

If new person comes to the forum and says they want to use 'pure' LWJGL, then don't scream at them to use LibGDX.

If they say they don't want to use 'pure' LWJGL, by all means, scream.

Why apply one standard to one approach but a different one to the other?

Currently:

If a person decides to use LWJGL, what happens? USE LIBGDX! USE LIBGDX! USE LIBGDX!However, if a person decides to use to LibGDX, nothing.

@People saying they should be presented the options and allowed to choose: Don't present the options. It will be biased. The very most would be 'You can use LWJGL/JOGL by itself, or libGDX'

The point is you can write direct lwjgl code with libgdx as well. And also you are way out of line saying libgdx is hard to setup. Lwjgl is DEFINITELY harder to set up. For basic desktop programming with libgdx you just have to add 2 jars, that's it.

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org