LibGDX backends

LibGDX makes use of several other libraries to interface the specifics of each platform in order to provide cross-platform support for your applications. Generally, a backend is what enables LibgGDX to access the corresponding platform functionalities when one of the abstracted (platform-independent) LibGDX methods is called; for example, drawing an image in the upper-left corner of the screen, playing a sound file at a volume of 80 percent, or reading and writing from/to a file.

LibGDX currently provides the following four backends:

  • Lightweight Java Game Library (LWJGL)
  • Android
  • JavaScript/WebGL
  • iOS/RoboVM

Lightweight Java Game Library

Lightweight Java Game Library (LWJGL) is an open source Java library originally started by Caspian Rychlik-Prince to ease game development in terms of accessing the hardware resources on desktop systems. In LibGDX, LWJGL is used for the desktop backend to support all the major desktop operating systems, such as Windows, Linux, and Mac OS X.

Lightweight Java Game Library

For more details, check out the official LWJGL website http://www.lwjgl.org/.

Android

Google frequently releases and updates its official Android SDK. This represents the foundation for LibGDX to support Android in the form of a backend.

There is an API guide available, which explains everything the Android SDK has to offer to Android developers. You can find this at http://developer.android.com/guide/components/index.html.

WebGL

The WebGL support is one of the latest additions to the LibGDX framework. This backend uses the GWT to translate the Java code into JavaScript and SoundManager2 (SM2) among others in order to add a combined support for HTML5, WebGL, and audio playback. Note that this backend requires a WebGL-capable web browser to run the application.

WebGL

The following are some useful links that will help you get a detailed description:

RoboVM (iOS backend)

The goal of the RoboVM open source project is to bring Java and other JVM languages to iOS. RoboVM's ahead-of-time compiler translates the Java bytecode into a native ARM or x86 machine code that runs directly on the target CPU without being interpreted. The runtime is based on Android's runtime classes and includes a Java to Objective-C bridge, which makes it easy to use the native Cocoa Touch APIs from Java.

You can find more about RoboVM at http://www.robovm.com, and you can check the currently working code at https://github.com/robovm/robovm.

RoboVM (iOS backend)
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset