Port your libgdx app to x86 Android and win with Intel!

Intel Developer Zone and BeMyApp are holding a couple of code fests over the next few weeks in Berlin, New York and Santa Clara. During these events, Intel will help you port your Android apps using native code to x86, free of charge!

To motivate you, you can win prices (trip to MWC 2013, tablets, Ouyas, go-to-market package) by porting your app and submitting it to the Google Play Store within 2 weeks after the respective code fest. Best of all: libgdx games can participate, and the porting couldn’t be simpler.

Porting your libgdx app to x86 Android

You have to use the nightlies for this to work. Make sure all the jar files are from the latest nightlies. Next, copy the x86/libgdx.so file to your Android project’s libs/x86/ folder. If you use the gdx-freetype extensions, simply copy the extensions/gdx-freetype/x86/libgdx-freetype.so file to your Android project’s libs/x86/ folder. To use bullet, copy extensions/gdx-bullet/x86/libgdx-bullet.so to your Android project’s libs/x86 folder.

That’s it, your app is now x86 compatible! You can test it by setting up an x86 Android emulator. Let’s look at the event details and how to win fabulous prices!

Code Fest Berlin, 9th of November, 2013

In Berlin, November 9th, from 2pm to 8pm, at co-up, Adalbertstra├če 8, 10999 Berlin. More information can be found at the Code Fest Berlin site.

You need to be based in Germany to participate in this event.

The awards

  • The two best ported app will get a trip to Barcelona with invitation to Mobile World Congress 2013
  • The fifteen first team who successfully port their app to x86 (which means no buggy app) will get a tablet
  • The fifteen next team who successfully port their app to x86 (which means no buggy app) will get a OUYA
  • Some of the team might receive a $5.000 go-to-market package (which is advertising on GP and Facebook)

Steps to follow

  1. Subscribe on the evenbrite: https://codefestberlin.eventbrite.fr
  2. Recompile your app and submit it to the Google Play store until the 23th of November, the earlier the better!
  3. Send an email at XXX with the effective Google Play link attached

The faster you port and submit your app, the better! I highly recommend attending the event, Intel dev guys will be there to help you out, and there’ll also be some test devices available! Don’t forget to register for the event!

Code Fest New York (1-2nd November), Santa Clara (15th-16th November)

The US Android Codefest is taking place in two places

  • New York, November 1st-2nd, at Alley NYC, 500 7th Ave, New York, NY 10018 Floor 17A.
  • Silicon Valley, November 15-16th SandBox Suites Silicon Valley, 3295 Scott Blvd. Santa Clara, CA

You can find more info on the official site. You need to be based in the US to participate in this event.

The awards

  • The best ported app will get a trip to Barcelona with invitation to Mobile World Congress 2013
  • The second best ported app will get $1.500 + $5.000 go-to-market package
  • The 3rd, 4th and 5th best ported app will get $5.000 go-to-market package

Steps to follow

  1. Subscribe on one of the evenbrite:
  2. Recompile your app and submit it to the Google Play store until the 16th (NYC) and 30th (SV) of November, the earlier the better!
  3. Send an email at XXX with the effective Google Play link attached

Again, make sure to register and attend the event(s), and submit your app as soon as possible!

If you run into any problems regarding libgdx, post a comment on this blog post!

Happy coding, and best of luck!

Android 4.4 for Game Developers

Android 4.4, code name KitKat, was released today, along with the new flagship phone Nexus 5 by LG. You can find more consumer oriented info on the Official Google Blog.

Developers should check out the Android KitKat release notes, as well as this Android 4.4 playlist on the Android Developer Youtube channel.

As has become usual around these parts, we are going to look at Android 4.4 from a game dev perspective.

New Memory Analysis Tools

The Android engineers have put a lot of work into memory management in Android 4.4, so that even devices with 512MB of RAM don’t struggle. Us developers have fancy new tools to analyze and battle memory issues that crop up in our apps. procstats and meminfo allow you to gauge memory usage over time via ADB. For on-device memory stats, there’s a new developer option in Settings > Developer Options > Process stats which visualizes the procstats results in a more high-level manner. Fancy!

Screen Recording

You can now do a high-quality screen recording of your app directly via DDMS. The video gets pulled down from your device and is encoded in MP4 format. Audio is sadly not recorded, but for marketing videos you usually add your own audio anyways. I haven’t tested this myself yet, so ymmv.

Immersive Mode

Since Android 4.0 (i think), you could disable the on-screen navigation bar to let your app use all of the screen. An example of this can be found when playing Youtube videos in fullscreen mode. For games, this wasn’t a viable solution, as the navigation bar would be shown again as soon as a user touches the screen.

The new immersive mode solves this issue, and is hence fit for games! In addition to the usual fullscreen flags (which libgdx sets for your automatically), you only specify one more flag called immersive sticky, and your game will use the entire screen. To get the navigation bar, a user simply swipes down from the top of the screen. With the immersive sticky flag, the status and navigation bars will be shown for a brief moment, before they get hidden by the OS again. They are actually overlayed in a translucent manner, your OpenGL surface doesn’t get resized (this is not true for the non-stick immersive mode). I let Roman Nurik explain it in more detail:

RenderScript via the NDK

From 4.4 onwards you can use RenderScript from within your C/C++ code directly. While this may not be directly game dev related, you may still want to look into it for some special use cases, i.e. image processing. It seems like the docs for this aren’t available yet (or the are hidden in a new NDK release, which i haven’t downloaded yet).

And that’s it. Android 4.4 seems to be a really solid release, adding a nice set of new features, even printing (by creating PDFs on the fly!).

Off to buy me a new Nexus 5!

I’m Back (and SoundPool on Android is broken)

I’m back. Been to Disneyland with my better half, we are engaged :D It was a blast.

lol

Coming back, i now have the awesome task of figuring out the state of libgdx and any issues that may have arisen during my absense. The build server is still humming along. The issue tracker hasn’t grown immensely. I’ll do a forum run tonight and catch up with Nex/Xoppa/Nate/etc.

The recent Android 4.3 release broke looping for sound effects. The problem is located in SoundPool, and Android class we use to playback sound effects. Android 4.3 introduced a bug that breaks looping of sound effects.

You can star the bug on the Android issue tracker. Refrain from posting “me too” comments, anyone subscribed will receive your useless message.

There’s currently no work around, using MediaPlayer is to heavyweight and hence not an option. This doesn’t affect libgdx only, other frameworks and engines have the same problem now.