RoboVM backend in libgdx nightlies and first performance figures!

I’ve spent the weekend integrating the libgdx RoboVM backend into our build as well as the setup-ui. I’m happy to report that both tasks have been completed! If you want to give it a spin, here’s what you need to do:

  • Get a Mac, you can only develop for iOS with a Mac. This also includes getting a developer certificate from Apple if you want to test on a device. Sorry, blame Apple
  • Install the necessary prerequisits. For RoboVM that means installing an Eclipse plugin, from this plugin URL: http://download.robovm.org/eclipse/ and installing XCode on your Mac. That’s it!
  • Download the setup-ui JAR, run it (double click), and create a new libgdx project, using the nightlies (click the button with the “N” on it to download the nightlies in the setup-ui)
  • Fire up Eclipse, and import all the projects. This will include the xxx-robovm project
  • To run things on the simulator, right click the RoboVM project, and select Run As -> iOS Simulator App. To run on a connected device, select Run As -> iOS Device App instead. Note that you have to provision your device first

The setup-ui will also generate a Xamarin based project, which you can delete or ignore. As stated earlier, we’ll include the Xamarin backend in 0.9.9, so generating both a RoboVM and Xamarin project via the setup-ui was the most sensible option at this point.

A couple of folks have already started porting their games from the Xamarin backend to the RoboVM backend. Among them is Christoph Aschwanden, head of Noble Master Games. Here’s the result:

His game “Demise of Nations: Rome” runs flawlessly. More importantly, it runs faster with RoboVM than with the Xamarin backend!. This is due to Niklas adding quite a few optimization to the latest RoboVM release, including more intelligent virtual method dispatch and enabling LLVM optimizations. I will setup a microbenchmark suite to get a feel for where the most time is spent. But having Christoph’s game as a comparative benchmark is already pretty amazing!

Also, Niklas added audio to the libgdx RoboVM backend. We still lack finegrained controll over individual sounds, but i’ll try to get that in as soon as possible so we have feature parity with the other backends.

I update the Wiki with information on the RoboVM backend. I’ll redo the setup video this weekend as well, and add a wiki article explaining RoboVM configuration files (similar to Android’s AndroidManifest.xml). Niklas is working on getting IPA creation to work, so folks can submit to the App Store.

We are in the process of doing some bugfixing and feature completion on the RoboVM backend at the moment, so it’s ready for the 0.9.9 release. Stay tuned for more info!

28 thoughts on “RoboVM backend in libgdx nightlies and first performance figures!

  1. Impressive. Thanks for the hard work!
    Unfortunately i get a error:

    Exception in thread “main” java.lang.NoClassDefFoundError: sun/reflect/ReflectionFactory

    I’m using reflection to dynamically create enums which are then used in my game

  2. Thank you for your answer but it didn’t help. Try it our yourself, in the RoboVM Project just put “ReflectionFactory factory = ReflectionFactory.getReflectionFactory();” somewhere and it won’t work.

  3. ReflectionFactory is a “private” Oracle API and they recommend against using it. It’s not available in RoboVM since we base our runtime lib on Android instead of Oracle’s OpenJDK. Please join the RoboVM Google Group and continue the discussion there and I’m sure we can help you fix you’re code to work on RoboVM.

  4. Very awesome! I still think Android is a superior platform for the end user, but being able to deploy an Android game to iOS is awesome! (And I hear iOS people are more willing to spend for paid apps).
    I’m assuming even java sockets will work fine? 😀

  5. This seems a bit too good to be true. Well done guys.

    Question: Mainly because I get confused and haven’t been keeping up with this iOS GDX thing. Does, or will, this this method work with Open GL ES 1.1 apps? If I could get Critter Rollers on iOS I would be over the moon.

  6. Man, that’s awesome. Thanks Mario and Niklas for the great Job. I’m a .Net Architect, but using java on all backends is very less painfull.

  7. Fantastic news. Thanks for the post and keeping us informed! I tested the audio support earlier this week and it runs fine. In addition, the file and memory footprint look okay and performance seems more than sufficient for our needs at the moment (relatively simple games). This is definitely a high value add for libGdx but also for RoboVM!

  8. Today i make my first test using RoboVM Backend. Amazing!
    Best of all is to have all projects in a single IDE.
    Thanks Mario and Niklas, LibGDX and RoboVM are the best!

  9. Amazing work on the robovm backend. Ive successfully ported my libgdx game using robovm and it works fine too! ios simulator as well as tested on ipad mini.

    Is it possible to submit to appstore at the moment?

  10. We’ve submitted Super Jumper to the App Store but it’s currently waiting for Apple’s review. I recommend you wait until we know for sure that Apple accepts the binaries RoboVM produces with the latest release.

  11. There’s a rare bug when the app is resumed after a couple of hours, the launcher image shows briefly and then replaced with a black screen. The game continues to play from when it was left, with sound but nothing is rendered. Looks like the app loses the opengl context if left in the background for too long. Happened on ipad mini.

Leave a Reply

Your email address will not be published.