Beginning 3D: using libGDX or LWJGL?

Don’t take this question the wrong way I know these two are very different, and I am not asking for which is better. In your 3D programming experience did you start off with a higher level engine? Or did you do all the dirty work yourself? If you did one did you wish you had started with the other? I hear some people say that it is best to learn the concepts first and then use a library after you have done your fair share of projects yourself. Furthermore, other people say to use an engine like libGDX when you are a beginner, but I hope this won’t lead to future problems when trying to use openGL with LWJGL. I want to hear your opinions about this I know that there is no definitive answer for this by any means. I have been recently doing some arcsynthesis tutorials for openGL and they are quite interesting and enjoyable. Then when I think about making a game in openGL i realize I want to poop my pants thinking about how complex it would be and time consuming (Although I don’t think I would mind a lengthy project, nothing easy is worth doing right?) . But this may just be because of my lack of knowledge for the time being. Well, post your opinions below anything is appreciated!

I personally just used straight up LWJGL. I have a thing against using libraries since I didn’t write the code, and I know its naive, but its the truth for me. Was it easier? Quite honestly, it wasn’t that hard at all. Now, to be fair the only 3D I’ve ever done is with the old fixed function pipeline which does a lot of the math for you, like matrices and rotation etc… But it was all easier than I thought it would be!

I did use LibGDX for 2D games there for a while, but I found that after I used LWJGL for my 3D games I really wanted to just use my own libraries I create. Thus began my adventure into shaders and the more modern OpenGL. I almost regret spending almost six months working with old deprecated code, but I do know the basics of how OpenGL works by now, so it has benefited me.

In my opinion, I’d say use whatever you feel comfortable with. I like creating my own libraries, but you might like using libraries that you didn’t create! I would recommend working with LWJGL because it will give you a far greater understanding of how OpenGL works, and some people will argue against that because you can’t put out a game as fast. But quite honestly, aren’t most of us here doing game development as a hobby? If I was working for a games studio, hell yes I would use as many libraries as I could fit into my greedy nerd-like claw. But since its for fun, I like learning what everything does.

But its up to you to decide! More knowledge of how OpenGL works so you can create your own libraries someday and slower development times, or a 3rd party library, less understanding of the code but faster development times?

You’ve been at this forum long enough to know what the answer is going to be. :point:

All I’ll say is that the hard part of 3D is not rendering. It is the math.

+1 Definitely the math is the hardest. If you try to create your own matrix library, I’d suggest not to. Unless you’re really good at that kind of stuff, matrices can be very tricky, and you should just use a library for them. Otherwise, you’ll need to know some trig and probably some algebra. You’ll need to know vector math (which isn’t that hard!) and lots of other stuff.

Here’s a quick review of vectors in plain layman’s terms, which is really nice:
http://www.mathsisfun.com/algebra/vectors.html

Some for matrices:
http://www.mathsisfun.com/algebra/matrix-introduction.html

And a “quick start” to trig:
http://www.mathsisfun.com/algebra/trigonometry.html

Also, remember to use radians for everything! I know it sounds silly, but so many people make the mistake of using degrees.

Once you learn the math and concepts, LWJGL is great. It just requires you to learn a lot more than libGDx. Also, what heroes said, why create another topic when there are already many others who have asked this same question?

The first steps are alway the hardest. Once you get the hang of it though, it’s gonna be second nature.

I’ve been in GameDev.net for a long time, and I’ve still couldn’t accept that known answer.

I’d be looking at JMonkeyEngine to do some 3D stuff.

Cas :slight_smile:

sigh libGDX for all intensive purpose is LWJGL. It just has some heavy lifting done for you. If you want to make 3D games fast, go with JMonkeyEngine or libGDX. If you want to understand the whole 3D rendering pipeline, start from scratch with lwjgl.

LWJGL is NOT an engine or even really a library. It is opengl bindings. Libgdx is a library.

I personally say start with lwjgl and dive in. Smash your head against a wall for a while. Then once you got some slow 3D graphics moving around and stuff switch to a higher level api and fall in love. I still have yet to switch. My head is not bloody enough.

+1 For that. I don’t understand how people can use something but not want to know how it works. I understand not knowing completely how it works, because it takes months to learn OpenGL, but at least know the basics. Game engines/libraries can’t do everything you want, and most likely someday you’ll find limitations and want to do things on your own. Would you rather have already learned the basics so you can just do things on your own or would you rather have to learn it all later on, because you will need to know some of it eventually. Its just like the Java2D API. Pretty much everyone has used it once, and I’m sure most of us could tell you how it works from past experience, so why not learn OpenGL? It just baffles me sometimes how people can just use something and not actually know what it does.

And honest to God, once you’ve messed around in OpenGL for a few months/weeks, it all becomes easy. Setting up the graphics for 3D now for me is easy, its just the math and collision detection and face picking etc… That’s hard. OpenGL is no longer the issue because I just sat down and learned it and went against the flow for a while.

It’s just not important. It all depends on what You want to achieve. IF knowledge is Your target, then explore You must. But if You have an idea that You want to realize, than all the implementation is just in ones way to fulfill the dream.

For a nice car analogy: I don’t care, how the car works, I just want a ride home.

Ok, I understand that, but consider this. Your fancy car breaks down in the middle of the desert with no one around for miles. You don’t know anything about the car so you start just dragging yourself through the scorching hot desert.

Or; Your car breaks down in the desert, but that’s ok because you have the tools to fix it in the trunk, and in under an hour you’re on your way again.

I get what you mean, but I have to strongly disagree with you. I think relying on something that is not always going to be around without having a backup plan is not wise. And I don’t think coding without knowing will just lead to confliction issues between code that you think should work, but won’t work with the API you’re using. Libraries like LibGDX don’t force you to code in one way, you can put code wherever you want and mix functions. But if you have no idea what those functions do, then how will you know how to fix it when something doesn’t mix correctly?

It is not about understanding every little thing but the general concept of things going on.

Car analogy. Cars engine craps itself. Well I doubt you have the tools nor experience to fix that. Car gets a flat tire. Grab the jack and a spare and you are good to go.

If you understand the basics of what is going on under the hood, you can figure out what is wrong and may be able to fix it or give the car mechanic an easier time trouble shooting.

I have a friend who is a huge unity head. He is a much better coder then me but he is stuck in many unity game engine ideals and abstractions. He knows a whole lot more about general graphics coding but when it comes down to unity doing something wrong, he is SOL. He thought that font rendering was trivial (and by trivial fast) and something that is really easily done. I asked him to write a font renderer in his opengl/d3d binding language of choice. A week later he says that it is a huge pain in the ass.

It is a balance of knowing enough basics to use the engine effectively.

FACT: No one on here will code an engine that comes to being even remotely as robust as JMonkeyEngine. Not that the person is not capable but it would require too much time.
Someone could code a faster sprite render or something but not the whole damn thing.

“Smart is not the one who knows all the answer, but how knows how to find them”

It is not required to know how everything works, more so on the internet day and about coding. The answers are there, on the internet. You just need to search and find them. As such I do not think it is necessary to know how everything works under the hood.

The disagreement comes from how to view the requirement of knowing OpenGL (or other technicalities under the hood). For me it (knowing OpenGL) is secondary, while others, on this particular thread also, have the opinion of the knowledge being primary.

While I am not saying one is right, the other is wrong, I am saying “there are other ways”.
Something that is confusing one, is common sense to other. Basically, for each their own.

Besides, I think I derailed this thread long enough. I apologize for that.

Ok, I can respect that and I realize some people aren’t in it for the knowledge. I guess neither of us are right! Well, thanks for playing :slight_smile: Yeah this thread is major derailed again…

“all intents and purposes” or possibly “all in tents and porpoises”.

I will start learning 3D, at least the basic… For now i want master the 2D haha. But i guess that libgdx will help me learn the basics…

Then in some months i can go lwjgl and try to learn everything :stuck_out_tongue:

I agree with you. Understanding the basics is very helpful to use engines and in my humble opinion, writing an engine is very time consuming and it’s impossible to make something better alone than with a nice community. That’s why I prefer improving Ardor3D rather than writing my own engine. I haven’t written a sprite renderer, I have ported its JOGL renderer to JOGL 2.x, I implemented 2 loaders with Renanse’s help, I implemented an exporter, I fixed some bugs, it’s more rewarding that improving my own engine that nobody will ever use except a few students.