Help make libgdx polyglot

I started libgdx as a Java library (with some C/C++ under the hood) Java is the lingua franca to which all other JVM languages can bind, that’s usually not the case the other way around. Making libgdx available to other JVM languages was part of the reason why i tortured myself with the shortcomings of Java.

I want people to realize that you can use a wide range of languages with libgdx, not only on the desktop, but also on Android. I know that some of the hotter JVM languages already work on Android, i think this could be pushed further.

Quite a few people experimented with libgdx and Scala/Clojure/JRuby/Jython. Here’s a short, incomplete, list:

I’ve seen a lot more than those already, but sadly i suck at finding links.

How you can help!

Know Scala/Clojure/JRuby/any other JVM language? Consider helping us out with the following:

  • easy:If you already have some material online, send us a link! No matter what it is
  • medium: For folks knowing your language: write an article on how to use libgdx in your language as idiomatically as possible. Document any issues you came across
  • hard: For folks not knowing your language: write a simple tutorial to get folks up and running with your language of choice and libgdx. Learning a new language through game programming is an excellent oportunity, consider including the following:
    • Setting up the development environment, getting the dependencies to libgdx right
    • Running & Debugging
    • Packaging
    • Deploying to supported platforms, e.g. desktop, Android, maybe even iOS, see below
  • Fatality:Help us provide archetypes, project templates, what have you to make setting up a libgdx project in your language’s environment easier!
  • If possible, let us put all articles on the Wiki, all code on Github or Bitbucket, for greater good!

I would love to help with those things as possible, however, my budget is limited as always. I’d really appreciate if JVM language enthusiasts that are using libgdx could chim in.

Future Possibilities, Caveats

Given these things, i could look into how to make those things work on iOS as well. All these languages compile to Java bytecode, many don’t rely on native code and only a limited subset of the Java Class Library. It might just be possible to get say Scala to run on iOS as well, through the power of IKVM and MonoTouch (or maybe even Avian).

The only caveat: the HTML5/GWT backend does not work through Java bytecode, but Java source code. Not all hope is lost, Kotlin has a Javascript backend that does not seem to rely on GWT. We might just be able to leverage that work to bring more JVM languages to the web, without hideous Java applets.

12 thoughts on “Help make libgdx polyglot

  1. Very cool.. Scala is the first on my target list due to joint compilation and a few other aspects. I am curious though how smooth integration will be given the OOP nature of libgdx. I am not so sure if extension / inheritance is going to be a best route w/ any given JVM language.

    Integration w/ JVM languages is a background concern as to why I am taking my time orienting around a well defined component oriented API. IE inheritance not the vehicle for integrating Java level code w/ a JVM language or JVM language code back w/ the Java layer.

    As always I am curious what the libgdx community will accomplish in this regard.

  2. ^^^ Nice.. under my nose too. I installed Idea 12 the other week and am impressed again. A fresh build for my efforts went from 9 min to 23 seconds w/ separate process parallel compilation. Installed the Kotlin plugin and messed around a bit.. hmm..

  3. Hi,
    we published our first game Bounce Away on gplay which is almost entirely written in Clojure.
    About a year ago I began writing a blog ( golambda.blogspot.com ), but most of it is outdated.
    I learned a few things about Clojure game programming and if I find the time I might write some stuff about it. However, you can always email me if you have questions.

    – thomas

  4. Hi,
    I started experimenting with Clojure and libgdx and the results can be found from my blog: http://clojuregames.blogspot.com. All the code (at least for now) are also shared via github. So far there’s just fairly simple stuff, such as loading a .tmx map and creating a character to walk on top of it, but more will follow.

Leave a Reply

Your email address will not be published.