scene2d, SelectBoxStyle changes

Nate is back! To celebrate, I break your code. I break all your codes! SelectBoxStyle has been modified so you can fully style the drop down list. Previously you could only set the list background and selection, like this:

Now instead of listBackground and listSelection you need to give a ScrollPaneStyle and a ListStyle:

Of course with the scene2d Skin JSON magic, you can reference previously defined styles:

If you use a SelectBox, you’ll need to make similar changes. Sorry for the minor breakage, but it’s better! The main reason to do it was to allow the scrollbars to be styled on the list. Previously if the list had many items the scrollbars were not visible and could only be scrolled by dragging, which was not intuitive.

In other news, the honeymoon was awesome. Now it is back to work on libgdx and Spine. Amazing how far behind you can get in just two weeks! Also, say hello to our new family member, Moo the Puggle:

Moo the Puggle

Some more pics. The last one is Mario beating her. 🙁 More like Wario — zing!

Libgdx and RoboVM on a device

Niklas, the man behind RoboVM, a JVM for iOS, just fixed up a few things that make RoboVM work with libgdx properly. This includes being able to run things on a device!

I managed to run all our demo games for which there’s a RoboVM project (Super Jumper, Vector Pinball, Pax Britannica, Gdx Invaders), and am happy to report that they all run very well on both an IPad 2 and IPad 3. Except for Pax Britannica, which has a couple of issues and seems to be too much. I haven’t done formal benchmarks yet, but things look really promising.

If you feel like testing things out (realizing that this is still super early days with lots of work to be done), here’s a quick rundown on how to get things going.

  1. Make sure you have all prerequisits for libgdx development for iOS, except Xamarin.iOS/Monotouch!
  2. Open Eclipse, and install the RoboVM plugin from http://libgdx.badlogicgames.com/robovm/eclipse/. This will install everything you need
  3. Get the libgdx source and import all projects into Eclipse
  4. Right click any of the xxx-robovm projects in Eclipse, select Run As, then iOS Device App, or iOS Simulator App
  5. See things running on your iOS simulator or device! (Note that you need to provision your device to be able to run anything on it, which costs you 90$/year. Thanks Apple!)

Currently lacking/broken:

  • Touch doesn’t work on the simulator, but works fine on the device. Investigating.
  • Audio is missing completely, we’ll use ObjectAL most likely
  • Many things in the Input class (proper orientation handling, keyboard input, etc.) are missing
  • Benchmarking and optimizations
  • Proof of concept on the iOS App Store
  • Debugging support (unlikely to come soon, but hey, it’s free and super easy to use)

Benefits over the Xamarin backend:

  • Free, apart from the mandatory 90$ Apple developer cert
  • Open-Source
  • Full JRE class library support, same as Android 4
  • Extremely fast compilation and deploy times (seconds, not minutes) to both the simulator and device

I’ll try to put some work into it over the next few weeks, maybe we can finish this puppy up. Please refrain from filing RoboVM issues on our tracker for the time being.

Happy coding!

libgdx and Android x86

For quite some time now, folks have asked if we could provide Android x86 builds of our native libraries. Today we granted that wish. The nightlies now come packaged with x86 Android binaries of our native libraries. This includes libgdx.so, as well as the natives of gdx-bullet, gdx-freetype and gdx-image. gdx-audio is currently only available for ARM, due to it using ARM assembly to speed up decoding.

To use the x86 natives, simply copy the x86/ folder from the nightlies to your Android project’s libs/ folder (next to the armeabi and armeabi-v7a folder). The setup-ui will not add those libraries for you automatically. I opted to do it this way for the time being as x86 Android devices are super rare, and you’d just blow up the size of your APK unnecessarily.

I also removed libandroidgl20.so. That contained our custom Android OpenGL ES 2.0 bindings. They are now directly compiled into the libgdx.so file.

Enjoy.