My experiences with LibGDX

Context

Before explaining my experiences I should put this post into context, both by explaining its reason for existence and by explaining where I as a developer am coming from, which I believe will offer some clues as to whether what I’m saying has any relevance (and I’m not arrogant enough to consider that it is). I should also explain that despite the bitching, I think LibGDX is fantastic. It’s really the best option out there, I’ve recommended it to other developers because this is what I believe. The cross-platform stuff is genuinely brilliant, way beyond my ability to do these things, and therefore I hugely appreciate the work done here.

I’m fairly new to the world of Java, having made the switch a few months ago from PHP. As I’ve been learning Java, I’ve put together the Koala Software project we see today. I’ve had about 20 years away from game development so I’m a little rusty, but confident that I have the skills to get back into the game. My Java skills won’t win any awards just yet but I’m getting there at a decent pace, helped by a day job coding Java.

Recently I have been developing a game with LibGDX with the aim of learning its workings ready for more advanced challenges ahead. The weekend just gone I had the pleasure of trying to get TiledMaps and LibGDX working together. It was an absolute nightmare. Were a swear jar to be placed next to my computer one imagines it would now be overflowing with coins. It was that bad. The result of this was a bit of a bitch and moan on twitter, see https://twitter.com/KoalaSoftware/status/298208867559546880, https://twitter.com/KoalaSoftware/status/298091520345661442 and https://twitter.com/KoalaSoftware/status/298156762522083329 where my ire is revealed. Looking back on that I should have been a little more polite, and kept my thoughts to myself, given that as I grew up I was always told that if I had nothing nice to say it was better to say nothing at all.

Experiences

My experience with LibGDX may well have suffered for coming at a time when refactoring has been happening. Certainly there was a big refactoring of Scene2D as far as I can tell, which led to most of the tutorials available on google to be wrong. I stumbled upon http://steigert.blogspot.co.uk/search/label/libgdx for instance, which certainly looks like a well-written tutorial, and got a reasonable distance through, before hitting a brick wall, eventually determining that the refactoring (http://steigert.blogspot.co.uk/2012/07/13-libgdx-tutorial-libgdx-refactoring.html) was the cause. Frankly this wrecked my flow, yes I could probably have grabbed an old copy of libgdx but then we were looking at going right back to the start again, and the explanation of the refactoring only added to the confusion.

Eventually I found https://www.youtube.com/user/doctoriley which got me back on my feet, but this was only after stumbling around blindly across half the internet wading through tutorials which had outdated code. So, I could get my engine together in terms of moving sprites around etc. Cool.

Next up tilemaps. I wanted a scrollable background after all, otherwise it wouldn’t look like anything was moving. Got to http://code.google.com/p/libgdx-users/wiki/Tiles and decided to follow that, fell at Packing (http://code.google.com/p/libgdx/wiki/TiledMaps) and frankly there was no decent help to be found anywhere to explain why none of what I was trying to do would work. I tried packing the map via the command line, no dice. I tried doing it from within my java, no dice, the thing couldn’t find the TMX files I’d lovingly placed in the assets folder. A complete write-off frankly, with obtuse tutorials and obtuse errors.

Eventually I made my way to Gleed2d (bit worried that it’s not been developed since 2010) which despite some shortcomings (really wish you could have a palette of pre-configured items to drop in with attributes defined – ie temperature, solidity, slipperiness, etc) seems pretty cool. Found a tutorial at http://siondream.com/blog/games/gleed2d-level-loading-system-for-libgdx/ and every link led to a 404. Every single one. Couldn’t download the helper jar, couldn’t get to the git repository, absolutely hopeless. Eventually I managed to find my way to some stuff in what I think is the libgdx master repository where it’s presently being moved to, and built from that, but there was no indication of what was going on.

So my experience here has been primarily that stuff gets changed with no thought for coders, tutorials become outdated the moment they are released, the interaction between elements of the libgdx ecosystem is unreliable (partly I suspect due to the haphazard moving of things by all concerned) and really this puts up a huge barrier for newbies. Not fun at all.

So LibGDX sucks right?

Nope, LibGDX is, as I said earlier, excellent. It does however suffer from a common flaw of open-source stuff (something I encountered when having to deal with Drupal for instance) where things just don’t get documented that well. LibGDX needs someone who knows it well to put together a good newbies guide so that others don’t have to experience what I did, and if I ever get to a point of knowing the system well enough to do that I’ll gladly throw my hat in the ring, but in the meantime, I lack that ability and hope someone else can step up.

 

This entry was posted in Uncategorized. Bookmark the permalink.

5 Responses to My experiences with LibGDX

  1. The link to the GLEED system has been fixed now. It had been moved to become a libgdx extension. Sorry for the inconvenience.

    https://github.com/libgdx/libgdx/tree/master/extensions/gdx-gleed

  2. I’m not celebrity! Just working on side projects and sharing the source in case it may help someone. Don’t worry, you know, I had been busy and didn’t realise there were broken references in the blog.

    There are actually gonna be further changes because we’ve been trying to unify the map API (Tiled and other system such as Gleed). Both are gonna replace existing stuff and they will be in libgdx core. Right now it’s in the mapsapi branch in the repo [1]. I guess it’ll eventually be merged into master.

    Let me know if you end up making something with the Gleed system, I’m curious about what people do with it.

    [1] https://github.com/libgdx/libgdx/tree/mapsapi/gdx/src/com/badlogic/gdx/maps

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Current day month ye@r *