Ok, so following the posts on the discussion about why people are still using java2D I have decided I want to try out libGDX. I was linked to where to download a libGDX ui setup application and then a tutorial for libGDX.

The ui app has created four projects for me. I only want to program for desktop, what do I do now? I'm really confused. I don't know what projects I need to work in or what other libraries I may/ may not need for libGDX.

in eclipse there's errors beside the andriod and html one, probably because I do not have the libraries for those.

what one do I code in?

Yes, the android and HTML ones will give you errors and you won't be able to compile them without the proper SDKs.

It doesn't matter if you are just developing for desktop, though. Put your game code in "game" and to test it run the main class in "game-desktop", like matheus said. Put your resources in assets/data of "game-android."

Another way to set it up is to create a new class library in Eclipse, and point to LibGDX's JARs and natives. Then you don't need android/HTML projects, just one project for everything. This is standard practice for installing any 3rd party library in Java, and something you should get comfortable with if you plan to continue using Java.

Just letting you know I ATTEMPTED to use libgdx but I cannot due to a bug with it and mac OSX's java 1.7 implementation - so if you plan on using it, you may want to stick with the older 1.6 release of java. I simply cannot use it as I rely on a number of 1.7 features. Oh well.

Why do you rely on 1.7 features? You realize that all Mac users < 10.7 (i.e. Snow Leopard and older) will not be able to play your game? Even if you're just using Java2D.

The bug is not because of LibGDX but because of LWJGL (or, more specifically, some drastic changes that were introduced with Java 7). The LWJGL devs have mostly fixed it, although it still needs more testing.

Why do you rely on 1.7 features? You realize that all Mac users < 10.7 (i.e. Snow Leopard and older) will not be able to play your game? Even if you're just using Java2D.

The bug is not because of LibGDX but because of LWJGL (or, more specifically, some drastic changes that were introduced with Java 7). The LWJGL devs have mostly fixed it, although it still needs more testing.

This is one thing I'll never understand about APIs. There's 5 versions of something, and only the oldest versions are acceptable to use. Java 1.7 is great, has lots of new features and is a joy to work with. The reality is nothing supports it, so it's effectively useless for anything. By the time 1.7 has any support I'm sure 1.8 will be out. I guess I'll go back and switch out a lot of my clean exception handlers and switches back into noisy catch and if/else blocks..

Is there anything we can do to make this easier? I'm a bit at a loss, feedback is appreciated.

I actually set up a LibGDX project yesterday and ran into several issues. After some googling it was all fixable though but I ended up on stackoverflow to get the answers instead of in the wiki or so.

The issues I had:Had to get the Android SDK and GWT plugin (of the correct eclipse version, accidentally downloading the wrong version broke my eclipse )Had to set up the Android emulator (as I don't have an android phone)Had to run a few "Quick fix" to solve some dependency issuesHad to rename the class in the Application project as it had the same name as the class in my game project

All in all it went okay and if you cannot google yourself to solve these kind of issues it will probably be quite hard to create a game. Maybe add a troubleshooting section to the wiki?

Is there anything we can do to make this easier? I'm a bit at a loss, feedback is appreciated.

I actually set up a LibGDX project yesterday and ran into several issues. After some googling it was all fixable though but I ended up on stackoverflow to get the answers instead of in the wiki or so.

The issues I had:Had to get the Android SDK and GWT plugin (of the correct eclipse version, accidentally downloading the wrong version broke my eclipse )Had to set up the Android emulator (as I don't have an android phone)Had to run a few "Quick fix" to solve some dependency issuesHad to rename the class in the Application project as it had the same name as the class in my game project

All in all it went okay and if you cannot google yourself to solve these kind of issues it will probably be quite hard to create a game. Maybe add a troubleshooting section to the wiki?

Mike

Android SDK and GWT plugin: well it cant be helped if you want to use those platformsAndroid emulator: same thingyou dont need these things if you just use libgdx for pcadd a troubleshooting / "Quick fix": I'm guessing you are using the ui project generator thingy - and it has a warning and explanation for the quick fix

there are some issues, like when you already have a project to kinda merge it with these templates - or the naming issue, I recall that toobut it has been a while and the code may have changed

if time/work wasn't an issue, I would suggest an eclipse plugin itself. It would have dependencies on those needed plugins and you could just go "new libgdx project" and so on

Just reporting in that porting to libgdx went pretty well. The major issue I ran into was the fact that jBox2d is SLIGHTLY different from stock. It's not super changed, but it's changed ~just enough~ to be annoying. The last thing I have to solve is why I'm getting crashes on body removal; it was rock solid with official jbox2d, but is crashy using the libgdx version. I'm also not sure why you guys decided to do things like rename ENUMs and such. For example, is it REALLY necessary to change BodyType.DYNAMIC to BodyDef.BodyType.DynamicBody? Body on the end is a bit redundent as it is off of the BodyType enum.

Nonetheless, I got to take my android to work and show off my game so in the end it went pretty well.

Is there anything we can do to make this easier? I'm a bit at a loss, feedback is appreciated.

If there is, I don't see it. People can't expect everything to go well the first time they do something. That's why we have prototyping in the first place. There will always be newbies asking these questions, because they got stuck halfway through the first set up, and feel they've exhausted google by searching "this library does not work help", instead of searching for "libgdx project setup tutorial".

Learn by doing, and if after 2-3 hours you still haven't got anything on the screen, and you've been following a tutorial, then ask your question on a forum. The best way to learn how something works, is to stick your hand in it, and feel around. Don't think you're starting your awesome platform game the first time you set up libgdx. Getting Box2D physics implemented will take a long time, especially if you had problems with something as simple as the project setup. Just take it slow, and be happy for each new piece you get working.

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