Libgdx 2012

Time for a review of what happened in libgdx land in 2012!

It all started off with me coming back from San Francisco and having a bit off a cool down period. The first thing i did was rework the entire build system, cause i like pain, and create a way to more easily write JNI bindings manually. The end result was gdx-jnigen, a project that let’s you add C/C++ code directly to your Java source, does some parameter transformations for you (e.g. get pointers to direct Buffers, arrays and so on) and create build files for multiple platforms based on Ant instead of make or cmake. The code inlining is largely inspired by GWT’s JSNI. Here’s an example of how it looks:

Nasty, eh?

Next, i translated all our native code to gdx-jnigen and created a couple of extension projects. The first one was gdx-audio, including decoders for MP3, Ogg and Wav, to get raw PCM data, Soundtouch to do time stretching and pitch manipulation and KissFFT for fourier transforms. gdx-jnigen turned out to help tremendously with this and made working on the bindings almost effortless.

After the excourse into native land it was time to work on battery saving a little. We introduced non-continuous rendering and i reviewed the battery usage of one of my apps to give some insight into what to expect.

Rapid development was one of the biggest reasons why i started working on libgdx. Tools like texturepacker that run offline hinder me a little. Always having to start a preprocessing process before being able to view the results isn’t fun. That’s why i implemented PixmapPacker, allowing me to pack textures on the fly during runtime. This of course has a few downsides, e.g. worse packing behaviour and additional loading times, but for rapid prototyping it helps a lot.

Freetype support, to load arbitrary TTF fonts at runtime, was next on my list of things to add. With gdx-jnigen and the PixmapPacker that was a rather simple task, even though there where initial hiccups in terms of memory leaks and similar issues.

We also extended our file handling with a new file type, called local. Don’t ask…

I finally had time to work on the HTML5/WebGL backend based on GWT, triggered by PlayN’s availibility on that platform (can’t have them steal our wind! :). It took a lot of pain and tears, e.g. i had to add reflection to GWT for Nate’s fancy UI stuff to work, among other things. Ultimately it turned out to work pretty well, and there are already a couple of games running on WebGL and libgdx and few of them made it to facebook.

We didn’t discover any big Android issues this year, the platform seems to be rather stable now, safe for some device manufacturers incapability of providing working MP3 and OGG decoders. Well, and this little nasty bugger. Android counts direct Buffers against the Java heap, which means Java based games have a clear disadvantage compared to native code games when it comes to available RAM. We “fixed” that in libgdx.

We started the documentation initiative and are rather happy with it’s outcome so far. Our wiki has grown considerably and we also received quite a few pull requests for Javadoc additions. Documentation is an on-going effort, and we strive to improve it all the time.

In May we discovered that AppBrain reports us to be the #1 game development framework on Android. All of these numbers are of course to be taken with a grain of salt, but we seem to make an impact. Unity has closed the gap somewhat. I’d attribute this to the Unity guys offering the mobile licenses for free for a limited time. I guess there’s room for both.

In the light of our growing user base, i felt it necessary to overhaul our website. The end result is as good as i can make it with my limited web development skills. Not stellar, but functional. And most of all, all information is gathered in a single place, including Twitter and the blog.

In June i started working on our iOS backend. Instead of Avian, i now took the same road as PlayN, using Michael Bayne’s IKVM fork and MonoTouch. This became a real team effort, with Gemserk (Arielsan, Ruben), Noblemaster Games and others chiming in and providing tons of improvements and fixes. A couple of games have already been published to the App store. I’m currently working on getting things integrated in the gdx-setup-ui.

Nate started his great refucktoring of the scene2d API in June. A little later we had the “GREAT MERGE”, when we released 0.9.6 stable with the old scene2d, and switched our trunk to the new API. Initial reactions where mixed, but after a while the dust settled and the overall sentiment seems to be in favor of all the nice new things. Shiny wins.

In August we had our diaspora to Git/Github, much to the joy of Nate who had to correct his workflow. On the upside, we received around

We also deprecated our Jogl backend in august. It was based on the old 1.1 release and a big maintenance burden. Given the completeness and stability of the LWJGL backend we decided to kill it. Sorry Jogl, maybe we’ll meet again in the future.

One of the biggest helpers in getting libgdx out to the people is the gdx-setup-ui. It makes setting up the multiple projects for Eclipse extremely simple. Our good soul and Swing magician Obli is constantly improving the app, showing that you can actually create nice UIs with Swing. Obli’s also been contributing other things like the box2d editor.

I was invited to Apps World 2012 to speak on HTML5 and mobile gaming, as well as my book and libgdx. It was a blast! I meet with a few libgdx folks there, including Badly Drawn Rod and Exobyte. Nate and me have been invited to Istanbul earlier next year, maybe there will be more speaking oportunities coming up. If you are an organizer, feel free to ping us. We like talking without end!

We also extended our functionality on Android by adding a Livewallpaper backend as well as a Daydream backend. Ouya is sending us a dev kit so we can get some Ouya specific things into our APIs as well. Good times.

To round things off, we (almost) finished Maven integration for libgdx. I actually prefer using Maven myself for various reasons, so this is not good for our users but good for myself as well. Stay tuned for more updates on this in the coming weeks.

Of course, there’s a lot more that happened, from new contributors joining the project, to tons of bug fixes, sleepless nights, hangouts and so on. I guess the above gives a good indication of how much we achieved this year.

Happy new year, and let’s make 2013 even more successful!

  • http://blog.gemserk.com arielsan

    Happy new year :)

  • http://blog.yuzhe.me xiaobo

    In last year, libgdx is the best java open source game engine project. :) thanks Mario and all ther contributor.

  • Dmitry

    Thank you!
    Keep up a good work!

    Happy new year to libgdx and its developers! :-)

  • Aliaa

    Happy new year dear Mario.
    Thanks a lot for your great work.
    God bless you and all other libgdx contributors.

  • bach

    AYE! To bigger and greater things!

    Cheers

  • http://www.chrismweb.com ChrisM

    Happy New Year!

    Looking at this, I wonder if there is a place in the wiki with highlighted features added to LibGDX?

    For instance the ‘PixmapPacker’ is incredibly relevant to a project I am working on, but didn’t know it existed until this post.

    And I’m pretty sure Scene2d would save me tons of work, but right now I would just have to go through the source, so I probably spend a lot of time reinventing the wheel.

    Is there an in depth feature list somewhere?

    Congrats on all the work, and the accomplishments! Helping a lot of developers out- big time!

    I’m sure 2013 will be even better! Do you guys already have some idea on what you’ll be focusing on next quarter?

  • http://www.jengibre.com.ar Andres

    Good 2012 for cross platform development!

    What I find… “intriguing” is that both libgdx and PlayN have both the same focus, the same objectives, etc… two great brains (Mario in libgdx and Michael Bayne on PlayN) are working on two different projects that do almost the same…

    is it too dreamy to think of a unification of both of them? it will probably cost at first, but I’m sure that in the short term we will all benefit from the merger

    please think about it!

  • http://hdaraujo.blogspot.com Hugo Araújo

    Great job Mario, Nate and all others!

    I’m looking forward for all the cool new stuff in 2013 :)

    Wish you all the best.

  • http://www.noblemaster.com noblemaster

    Great work Mario & Happy New Year :-D

  • magnesus

    Great to hear about OUYA. I hear they’ve send you a developer console, nice. Good sum up and great job. Happy New Year.

  • Djal

    Great Work to all the team, thank you.

  • http://www.joshjordan.co.uk Josh

    I’m glad to hear that you’ll be looking at supporting the Ouya this year. I was hoping to do some testing on it with my Libgdx project! Happy New Year!

  • Angelusiones

    Amazing all things you have done and the Ouya support :D .

  • Chris

    I’ve got my OUYA dev kit and it looks like the basics for libgdx are working. Eclipse still has that nasty problem with not exporting other projects, but this is specific to my code setup.

  • http://mattiesworld.gotdns.org mxttie

    impressive!
    thanks, nice overview