Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (121)
games submitted by our members
Games in WIP (577)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2
  ignore  |  Print  
  [Final Decision] LWJGL or LIBGDX  (Read 6254 times)
0 Members and 1 Guest are viewing this topic.
Offline alaslipknot
« Posted 2013-05-02 15:04:52 »

Dear Experts,
 
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 ...  Undecided
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  Roll Eyes
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  Grin + Cool because of the classes i made to do the painting  Roll Eyes
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  Emo
and second, i just don't feel good working with it, it make me feel like am cheating, and "me no do that  Cranky "

soooo guys ...
any suggestion  Roll Eyes ??
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  Smiley

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

JGO Coder


Medals: 14


L___ o_ G___ a__ P___


« Reply #1 - Posted 2013-05-02 15:23:33 »

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.

Offline Cero
« Reply #2 - Posted 2013-05-02 15:57:33 »

Its true.

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...

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline quew8

JGO Coder


Medals: 31



« Reply #3 - Posted 2013-05-02 17:45:39 »

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.
Offline gouessej
« Reply #4 - Posted 2013-05-02 18:20:45 »

Hi

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, ...

Online HeroesGraveDev

JGO Kernel


Medals: 269
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #5 - Posted 2013-05-02 20:44:58 »

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.

Offline Regenuluz
« Reply #6 - Posted 2013-05-02 20:53:58 »

@HeroesGraveDev
I'm all with you there.

I'm going to learn(hopefully) how to use LWJGL, once my finals and such are over and done. Cheesy (I might pick up LibGDX at some point after that, but LWJGL first.)
Offline alaslipknot
« Reply #7 - Posted 2013-05-02 21:15:49 »

@HeroesGraveDev
did i told you before that you are awesome  Grin ??
Quote
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  Cool 
am going to stick with lwjgl, so beware a massive newbies question coming on the way  Roll Eyes

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."
Offline pitbuller
« Reply #8 - Posted 2013-05-02 21:17:41 »

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

Learning how to write boilerplate is portrayed to be way useful than it really is.

Online HeroesGraveDev

JGO Kernel


Medals: 269
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #9 - Posted 2013-05-02 21:41:29 »

Learning how to write boilerplate is portrayed to be way useful than it really is.

I'll assume you meant it's portrayed to be less useful than it really is.

(Enjoy your accidental appreciation)

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline StumpyStrust
« Reply #10 - Posted 2013-05-02 23:06:29 »

...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.

Offline alaslipknot
« Reply #11 - Posted 2013-05-03 00:41:55 »

@StumpyStrust
do i need more than glbegin/glend to do a 2D game Huh
i mean what else would i need except drawing squares,circles,line,points and loading images
you 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 one
but,
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  Grin )
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."
Online HeroesGraveDev

JGO Kernel


Medals: 269
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #12 - Posted 2013-05-03 00:45:40 »

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 Cranky 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.

That took barely anything compared to actually making a game.

Offline alaslipknot
« Reply #13 - Posted 2013-05-03 00:48:47 »

^
seems legit  Roll Eyes

"It's not at all important to get it right the first time. It's vitally important to get it right the last time."
Offline StumpyStrust
« Reply #14 - Posted 2013-05-03 03:21:49 »

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.

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

Tinkering and GFX programming is an important part of making games.
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.

@alaslipknot
Yes, 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.

Offline davedes
« Reply #15 - Posted 2013-05-03 03:22:58 »

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:
1  
2  
3  
4  
ShaderProgram p = new ShaderProgram(vertexSource, fragSource);
if (p.isCompiled()) {
    ... shader compiled successfully ...
}


Compiling a shader in LWJGL:
ShaderProgram code (this is only a fraction of a full ShaderProgram implementation)

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.

Offline 65K
« Reply #16 - Posted 2013-05-03 04:11:23 »

@StumpyStrust
do i need more than glbegin/glend to do a 2D game Huh
i mean what else would i need except drawing squares,circles,line,points and loading images
Developing a game is way, way more than "just" fiddling with graphics...
It is about AI, game play, balancing, sound design, fun, input and usability, ui widgets and layout algorithms, network for multiplayer games, entity handling, system architecture and class design, build system, testing, storing highscores, performance optimization, difficulty tweaking, game loops, loading and saving game states, tile maps, game physics, game menus, game options, cross platform concerns, collision detection, path finding, etc. ...
Not to forget polishing, polishing, polishing...

Online HeroesGraveDev

JGO Kernel


Medals: 269
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #17 - Posted 2013-05-03 04:14:23 »

I'm really getting sick of this argument. (I know I am partly to blame)

Lets settle this:

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.

Offline Jimmt
« League of Dukes »

JGO Kernel


Medals: 136
Projects: 4
Exp: 3 years



« Reply #18 - Posted 2013-05-03 05:41:58 »

I'm really getting sick of this argument. (I know I am partly to blame)

Lets settle this:

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.
Offline heisenbergman

JGO Coder


Medals: 14


L___ o_ G___ a__ P___


« Reply #19 - Posted 2013-05-03 05:57:56 »

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? Huh

Offline relminator
« Reply #20 - Posted 2013-05-03 06:32:46 »

The OP could just try both and decide for himself.


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)
Offline ReBirth
« Reply #21 - Posted 2013-05-03 06:36:20 »

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? Huh
Because he's on that side Grin

Offline heisenbergman

JGO Coder


Medals: 14


L___ o_ G___ a__ P___


« Reply #22 - Posted 2013-05-03 06:39:14 »

Well yeah Grin 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) Tongue

Online HeroesGraveDev

JGO Kernel


Medals: 269
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #23 - Posted 2013-05-03 06:57:38 »

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? Huh

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'

Offline masteryoom

JGO Coder


Medals: 5
Projects: 2


If you look closely, you might see it turning...


« Reply #24 - Posted 2013-05-03 06:58:48 »

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.

Smiley
Online HeroesGraveDev

JGO Kernel


Medals: 269
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #25 - Posted 2013-05-03 07:03:29 »

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.

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

Offline ReBirth
« Reply #26 - Posted 2013-05-03 07:05:40 »

The idea of using LibGDX is because you can avoid dealing with "low-level" or "raw" or whatever things you call it.

If someone like OP willing to do that, which I believe because he has motivation, then be it.

Offline masteryoom

JGO Coder


Medals: 5
Projects: 2


If you look closely, you might see it turning...


« Reply #27 - Posted 2013-05-03 07:06:41 »

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.

Roll Eyes
Unless the argument is solved, it will just pop up in another thread later.
 Angry You're not helping... (insert random text for quote rule)

Smiley
Offline heisenbergman

JGO Coder


Medals: 14


L___ o_ G___ a__ P___


« Reply #28 - Posted 2013-05-03 07:11:22 »

Roll Eyes
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.

Offline Cero
« Reply #29 - Posted 2013-05-03 07:14:06 »

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? Huh

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.

Pages: [1] 2
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

theagentd (19 views)
2014-10-25 15:46:29

Longarmx (52 views)
2014-10-17 03:59:02

Norakomi (45 views)
2014-10-16 15:22:06

Norakomi (34 views)
2014-10-16 15:20:20

lcass (39 views)
2014-10-15 16:18:58

TehJavaDev (68 views)
2014-10-14 00:39:48

TehJavaDev (68 views)
2014-10-14 00:35:47

TehJavaDev (60 views)
2014-10-14 00:32:37

BurntPizza (74 views)
2014-10-11 23:24:42

BurntPizza (45 views)
2014-10-11 23:10:45
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
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
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!