Setting Up libGDX?

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 issues
Had 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 platforms
Android emulator: same thing
you dont need these things if you just use libgdx for pc
add 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 too
but 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

An Eclipse Plugin would be an awesome way to set it up!

Mike

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.

Stay on official Gdx project setup, it’s safer and guaranteed to be working.

Thank’s, I got it setup, and am learning it.

Sorry, I thought code.google.com was just code but when i went on it, I followed a few tutorials on it. It’s quite good.

Like I said, be very careful - several parts of LibGDX have been replaced and some of those tutorials are deprecated/outdated.

It’s pretty solid on linux now… Switched to java 7 since about 3 months ago. Never had any problems with it. Liked the String-switches and the new File IO :slight_smile:

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.

[quote]People can’t expect everything to go well the first time they do something.
[/quote]
The first priority of a game development toolset should be easy set up. Press button A to download, press button B to install, press button C to compile and run your first game.

LibGDX is pretty easy to set up right now, but as with everything in life, there is still room for improvement. :slight_smile:

Yeah, this is extremely annoying. It’s not something specific to Java though, Python 3 was released in 2008 and it’s still not supported by many popular frameworks (Django, Google App Engine).