Switching from LibGDX to LWJGL good choice?

Alright I have kinda struggled to understand how to do many things with LibGDX. There simply just aren’t many resources of information for it, other than looking at the source code which doesn’t do much for me because I don’t know what I should look at if I want to do anything. I have, however, really enjoyed using libgdx so far because of it’s simplicity. I have heard that you can do everything, and more, than LWJGL with LibGDX and if I used LWJGL I would really just be re-writing what libgdx already does but because of the lack of available tutorials and stuff I’m rather torn :P.

From what I have seen, if you would like to go 3D and have lots of resources for information e.g. tutorials and web pages for it you should use LWJGL. Am I correct? Should I, for a while, switch to LWJGL to get an idea of the low level stuff? What’s your opinion? Would I have it easier if I had a different thought process to looking at the libgdx source code? Should I check out X webpage? Or should I go the harder way (LWJGL) but have more tutorials available to me?

Thanks
-cMp

This strikes me as a bit odd since I’ve found that there’s much more tutorials and references out there for LibGDX than any other Java gaming framework/library I’ve checked out.

The API of LibGDX is quite well-documented, for starters. If you don’t find your answers there, you’re bound to find something by Googling unless what you’re asking about is really obscure. stackoverflow.com alone has a lot of previously-asked questions re: LibGDX that covers a lot of ground. If all else fails, creating a thread here will usually help as there are a lot of other Java game developers currently using LibGDX.

Yeah I’ve created some threads, but I’m afraid of people getting irritated with me about posting a million threads…
I’m also trying 3D and that’s where the tutorials are very far and wide.

[quote=“Slyth2727,post:3,topic:43517”]
Well… as long as you’ve done your homework (looked at the API, googled extensively) I think creating threads will be not necessary very often. But if you still don’t find what you’re looking for after doing the research, creating a thread should be perfectly acceptable.

[quote=“Slyth2727,post:3,topic:43517”]
Ah, yeah, this might be the problem… I see much more 2D projects than 3D projects so maybe that’s it.

Cool.

So the best way to go would be LWJGL?

I really can’t say as I only have several months of game dev experience, and only with LibGDX used for a 2D game :smiley:

Take note though that LibGDX is built mostly on LWJGL iirc.

Yeah that’s what I was thinking. It’s built on LWJGL so shouldn’t it be easy for the devs to port over some lwjgl tutorials as they know which methods call with lwjgl/opengl methods?

I would say use what you can make work.

If you have a project and can find tutorials for it that helps you accomplish it better in LWJGL than LibGDX, then by all means go for LWJGL.

Sweet, that’s where I’m going now :slight_smile: you should see some 3D terrain gen stuff on here soon by me! Thanks for the advice

Good to learn lwjgl, but I’d say keep the libgdx architecture and just embed lwjgl code into it :slight_smile:

I answered this in another related thread:

LWJGL is bare-bones. It’s just a wrapper around OpenGL rendering and a window or fullscreen display. If you want to develop a game, you will need to pretty much write all the things that LibGDX has already implemented for you. A very short list, to give you a broader idea of the challenge involved in “pure LWJGL/OpenGL” gamedev:

  • Vector math (LibGDX uses JNI)
  • Image and sound decoding
  • Sprite batching, shader utilities, and vertex utilities
  • 2D GUI toolkit (this in itself is a huge undertaking)
  • Asset management and dependencies (also very complex)
  • Font rendering/parsing
  • 3D scenegraph and shader management (LibGDX’s 3D api handles this)
  • Camera, texture, input, and various other utilities

On top of all that, LibGDX implements this for far more platforms than LWJGL, allowing you to port it easily if needed.

So, I would recommend to stick with LibGDX. Whether you want to use pure GL calls, or make use of LibGDX’s utilities like ShaderProgram and Mesh, or even take a higher-level approach and use the new 3D API and shader managers, any choice would be more suitable than pure LWJGL.

[quote=“davedes,post:11,topic:43517”]
You mean, stick with LibGDX? :slight_smile:

Having problems finding LibGDX tutorials?

There you go: http://www.youtube.com/user/dermetfan
http://www.youtube.com/user/doctoriley

:wink:

Thanks for the answers guys! I think though, despite what you said I’m going to learn some LWJGL for a while just to get the underlying concept to all the stuff LibGDX does for me, and after that return to LibGDX with a new sense of what I need to do to create 3D stuff so I can just look it up in the source.

Already seen em ;). Thanks though!

Yes.

libgdx can run on the desktop (and other platforms) without LWJGL, so it is not built on LWJGL at all. libgdx has 6 official backends and LWJGL is just one of those. If you want to target the desktop, you can use the LWJGL or JGLFW backend. Both of these are just used to access OpenGL from Java and related tasks (windows, input events, etc). The LWJGL backend has ~6k lines of code. libgdx has ~1 million lines of code (including stuff like box2d).

Thanks for the clarification. Apparently, I didn’t recall correctly :stuck_out_tongue:

Fight The System! Use Pure LWJGL!

I actually have nothing against engines or libraries and even suffer from engine-envy now and then. Which to use is a matter of how you learn and how deep do you want to go. Do you want to take the blue pill and live an easy life, or take the red pill and live in a world of hell.

I’ve been developing a 3D project using LWJGL only (not even using their maths) for quite a long time. You seem pretty set on using LWJGL, so here’s some heads up things:

-It’s going to take a long time.
-It will take longer than you think.
-No really, it’s going to take much longer than you initially expect.

It’ll break your will and kill your motivation before you even get to render a simple cube. Be warned, after you get that first RGB triangle to render, you’re now on borrowed time. You’ll spend your days chasing that same high you got from the first triangle, only to find you’ve gone a month without any visual results. This isn’t something you just “do for a couple months”, since it’ll take a couple months before you even get a simple camera able to look at a 3D object.

It’s not that the concepts are that difficult. It’s because you’ll spend so much of your time creating things you need in order to just do the basic operations. Davedes has already listed a couple of those things for starters.

Aside from the time it takes to accomplish the basic functions, you’ll also find there isn’t a lot of information for creating everything from scratch for a Java 3D engine. A lot of examples will be done in a C language. But really most of it is understanding the concept and the individual syntax is less important.

Despite seeming negative about going this route, I’m not. I just want to emphasize how much of a marathon this is. It’s not about difficulty, it’s all about endurance. You’ll need a lot of it.

The end result is amazing however. You’ll have a greater understanding and won’t even need to dodge bullets anymore.

So by all means do it, just be aware of what you’re getting yourself into.

I program using model opengl (4.x with 3.x shaders) using LWJGL.

Creating your first big game/ useful game engine is a long and grueling process, but it is also very rewarding.

In terms of the game you create, it will take you a long time of learning and a ton of code to create a game that even closely compares to the things you can probably make easily in LibGDX, so it all depends on where you want to take yourself.

If you just want to work on games and focus on the higher aspects of the game (the characters/storyline) then don’t bother going to LWJGL it would not be worth it for a long time, but if you want to simply learn more about programming, are very interested in game mechanics, and if you like math/physics then LWJGL can teach you a lot and once you get over the steep learning curve it can become very rewarding.

Hi

You should wonder how far you want to go as I explained here. I agree with Redocdam, don’t underestimate the amount of nice things put into LibGDX and the amount of time to do even 5% of that by yourself with a raw Java binding for the OpenGL API. I have never used LibGDX for 3D, its 3D API is less mature than existing 3D engines written in Java but maybe it is worth a try. Anyway, if you succeed in learning OpenGL in Java, if you understand the basic concepts of computer graphics and OpenGL itself, you’ll feel more comfortable with all middle and high level APIs using them.