LibGDX explained

libGDX
Author:Mario Zechner
Latest Release Version:1.12.1
Programming Language:Java, C, C++
Operating System:Windows, Linux,, Android,, iOS,, JavaScript/WebGL
Platform:Java platform
License:Apache License 2.0
Website:https://libgdx.com

libGDX is a free and open-source[1] game-development application framework[2] written in the Java programming language with some C and C++ components for performance dependent code.[3] It allows for the development of desktop and mobile games by using the same code base.[4] It is cross-platform, supporting Windows, Linux, macOS, Android, iOS, BlackBerry and web browsers with WebGL support.[5]

History

In the middle of 2009 Mario Zechner, the creator of libGDX, wanted to write Android games and started developing a framework called AFX (Android Effects) for this. When he found that deploying the changes from Desktop to Android device was cumbersome, he modified AFX to work on the Desktop as well, making it easier to test programs. This was the first step toward the game framework later known as libGDX.[6]

In March 2010 Zechner decided to open-source AFX, hosting it on Google Code under the GNU Lesser General Public License (LGPL). However, at the time he stated that "It's not the intention of the framework to be used for creating desktop games anyway", intending the framework to primarily target Android. In April, it got its first contributor.[7]

When Zechner created a Box2D JNI wrapper, this attracted more users and contributors because physics games were popular at the time. Many of the issues with Android were resolved because of this.

Because many users suggested switching to a different license due to LGPL not being suitable for Android, libGDX changed its license to the Apache License 2.0 in July 2010, making it possible to use the framework in closed-source commercial games.[8] The same month its phpBB forum was launched.[9]

Due to issues with Java Sound the audio desktop implementation switched to OpenAL in January 2011.[10] Development of a small image manipulation library called Gdx2D was finished as well, which depends on the open source STB library.[11]

The rest of 2011 was spent adding a UI library[12] and working on the basics of a 3D API.

At the start of 2012 Zechner created a small helper library called gdx-jnigen for easing the development of JNI bindings.[13] This made it possible for the gdx-audio[14] and gdx-freetype[15] extensions to be developed over the following months.

Inspired by Google's PlayN cross-platform game development framework that used Google Web Toolkit (GWT) to compile Java to JavaScript code, Zechner wrote an HTML/JavaScript backend over the course of several weeks, which allowed libGDX applications to be run in any browser with WebGL support. After Google abandoned PlayN, it was maintained by Michael Bayne, who added iOS support to it. libGDX used parts of this work for its own MonoTouch-based backend.[16] [17]

In August 2012 the project switched its version control system from Subversion to Git, moving from Google Code to GitHub. However, the issue tracker and wiki remained on Google Code for another year. The main build system was also changed to Maven, making it easier for developers with different IDEs to work together.[18] [19]

Because of issues with the MonoTouch iOS backend Niklas Thernig wrote a RoboVM backend for libGDX in March 2013, which was integrated into the project in September.[20] [21] From March to May 2013 a new 3D API was developed as well and integrated into the library.[22] [23]

In June 2013 the project's website was redone, now featuring a gallery where users can submit their games created with libGDX.[24] more than 3000 games have been submitted.[25]

After the source code migration to GitHub the year before, in September 2013 the issue tracker and wiki were also moved there from Google Code.[26] The same month the build and dependency management system was switched from Maven to Gradle.[27]

After a cleanup phase in the first months of 2014 libGDX version 1.0 was released on 20 April, more than four years after the start of the project.

In 2014 libGDX was one of the annual Duke's Choice Award winners, being chosen for its focus on platform-independence.[28] [29]

In April 2016 it was announced that libGDX would switch to Intel's Multi-OS Engine on the iOS backend after the discontinuation of RoboVM.[30] [31] With the release of libGDX 1.9.3 on 16 May 2016 Multi-OS is provided as an alternative, while by default the library uses its own fork of the open source version of RoboVM.[32] [33]

libGDX Jam

From 18 December 2015 to 18 January 2016 a libGDX game jam was organized together with RoboVM, itch.io and Robotality. From initially 180 theme suggestions "Life in space" was chosen as the jam's main theme, and 83 games were created over the course of the competition.[34] [35]

Release versions

VersionRelease date
20 April 2014
23 May 2014[36]
22 June 2014[37]
9 August 2014[38]
10 October 2014[39]
8 December 2014[40]
6 May 2015[41]
21 September 2015[42]
5 January 2016[43]
24 January 2016[44]
18 April 2021[45]
11 May 2022[46]
2 July 2023[47]

Architecture

libGDX allows the developer to write, test, and debug their application on their own desktop PC and use the same code on Android. It abstracts away the differences between a common Windows/Linux application and an Android application. The usual development cycle consists of staying on the desktop PC as much as possible while periodically verifying that the project still works on Android. Its main goal is to provide total compatibility between desktop and mobile devices, the main difference being speed and processing power.[4]

Backends

The library transparently uses platform-specific code through various backends to access the capabilities of the host platform. Most of the time the developer does not have to write platform-specific code, except for starter classes (also called launchers) that require different setup depending on the backend.[48]

Other JVM languages

While libGDX is written primarily in Java, the compiled bytecode is language-independent, allowing many other JVM languages to directly use the library. The documentation specifically states the interoperability with Ceylon, Clojure, Kotlin, Jython, JRuby and Scala.[53]

Extensions

Several official and third-party extensions exist that add additional functionality to the library.

gdxAI

An artificial intelligence (AI) framework that was split from the main library with version 1.4.1 in October 2014 and moved into its own repository. While it was initially made for libGDX, it can be used with other frameworks as well. The project focuses on AI useful for games, among them pathfinding, decision making and movement.[54] [55]

gdx freetype

Can be used to render FreeType fonts at run time instead of using static bitmap images, which do not scale as well.[56]

Box2D

A wrapper for the Box2D physics library was introduced in 2010 and moved to an extension with the 1.0 release.[57]

packr

A helper tool that bundles a custom JRE with the application so end users do not have to have their own one installed.[58] [59]

Notable games

Notes and References

  1. Web site: Official website . libgdx.badlogicgames.com . 2 January 2016 . 27 May 2011 . https://web.archive.org/web/20110527022922/https://libgdx.badlogicgames.com/ . dead .
  2. Web site: Goals and Features. libgdx.badlogicgames.com. 16 December 2015. 6 June 2012. https://web.archive.org/web/20120606232500/https://libgdx.badlogicgames.com/features.html. dead.
  3. Web site: mobilegameengines.com/game_engines/32-libgdx. dead. https://web.archive.org/web/20150118010130/http://mobilegameengines.com/game_engines/32-libgdx. 18 January 2015.
  4. Web site: Home - libGDX. libgdx.com.
  5. Web site: libgdx/README.md at master. github.com.
  6. Web site: libGDX 1.0 released . badlogicgames.com . Mario . Zechner . 20 April 2014 . 31 December 2015 . 13 February 2021 . https://web.archive.org/web/20210213212631/https://www.badlogicgames.com/wordpress/?p=3412 . dead .
  7. Web site: The Future... . badlogicgames.com . Mario . Zechner . 6 March 2010 . 31 December 2015.
  8. Web site: libgdx changes its license . badlogicgames.com . Mario . Zechner . 13 July 2010 . 31 December 2015.
  9. Web site: Forums! . badlogicgames.com . Mario . Zechner . 10 July 2010 . 3 January 2016.
  10. Web site: OpenAL & Natives Loading in Libgdx . badlogicgames.com . Mario . Zechner . 21 January 2011 . 3 January 2016.
  11. Web site: Gdx2D and Super Jumper . badlogicgames.com . Mario . Zechner . 26 January 2011 . 3 January 2016.
  12. Web site: UI Fun on Android with libgdx . badlogicgames.com . Mario . Zechner . 25 June 2011 . 3 January 2016.
  13. Web site: gdx-jnigen: a stupid idea that might just work . badlogicgames.com . Mario . Zechner . 3 January 2012 . 3 January 2016.
  14. Web site: gdx-audio . badlogicgames.com . Mario . Zechner . 8 January 2012 . 3 January 2016.
  15. Web site: Create BitmapsFonts on the fly with gdx-freetype . badlogicgames.com . Mario . Zechner . 6 March 2012 . 3 January 2016.
  16. Web site: Libgdx on iOS, days 1–2 . badlogicgames.com . Mario . Zechner . 8 June 2012 . 3 January 2016.
  17. Web site: Libgdx on iOS, day 5 . badlogicgames.com . Mario . Zechner . 13 June 2012 . 3 January 2016.
  18. Web site: Git & Maven . badlogicgames.com . Mario . Zechner . 8 August 2012 . 4 January 2016.
  19. Web site: Libgdx is now on Github (sorta) . badlogicgames.com . Mario . Zechner . 10 August 2012 . 4 January 2016.
  20. Web site: Early stage RoboVM libgdx backend . badlogicgames.com . Mario . Zechner . 9 March 2013 . 6 January 2016.
  21. Web site: RoboVM backend in libgdx nightlies and first performance figures! . badlogicgames.com . Mario . Zechner . 10 September 2013 . 6 January 2016.
  22. Web site: Brace yourselfs, new 3D API incoming . badlogicgames.com . Mario . Zechner . 28 March 2013 . 6 January 2016.
  23. Web site: New 3D API in master . badlogicgames.com . Mario . Zechner . 20 May 2013 . 6 January 2016.
  24. Web site: New libgdx site live! . badlogicgames.com . Mario . Zechner . 29 June 2013 . 6 January 2016.
  25. Web site: Gallery . libgdx.badlogicgames.com . 6 January 2016.
  26. Web site: The great libgdx Issue Tracker & Wiki Github Migration . badlogicgames.com . Mario . Zechner . 14 September 2013 . 6 January 2016.
  27. Web site: Welcome your new overlord: Gradle . badlogicgames.com . Mario . Zechner . 22 September 2013 . 6 January 2016.
  28. Web site: 2014 Duke's Choice Award Winners . blogs.oracle.com . Caroline . Kvitkar. 28 September 2014 . 30 December 2015 . Programmers can use this cross-platform game development framework to write, test, and debug Java games..
  29. Web site: libgdx wins Duke's Choice Award . badlogicgames.com . Mario . Zechner . 29 September 2014 . 30 December 2015.
  30. Web site: RoboVM is no more, what now? . Mario . Zechner . 15 April 2016 . 15 April 2016 . 8 November 2020 . https://web.archive.org/web/20201108101114/https://www.badlogicgames.com/wordpress/?p=3925 . dead .
  31. Web site: RoboVM Winding Down . Henric . Müller . 15 April 2016 . 16 April 2016 . 15 April 2016 . https://web.archive.org/web/20160415141437/https://robovm.com/robovm-winding-down/ . dead .
  32. Web site: libGDX 1.9.3 released – New iOS backends . Mario . Zechner . 16 May 2016 . 17 May 2016.
  33. Web site: MobiDevelop's RoboVM fork . 17 May 2016.
  34. Web site: libGDX Jam is on! – Theme Voting Round #1 . badlogicgames.com . Mario . Zechner . 22 November 2015 . 13 February 2016.
  35. Web site: libGDX Jam – And the winner is… . badlogicgames.com . Mario . Zechner . 6 February 2016 . 13 February 2016.
  36. Web site: libGDX 1.1.0 released . badlogicgames.com . Mario . Zechner . 23 May 2014 . 13 February 2016.
  37. Web site: libGDX 1.2.0 released . badlogicgames.com . Mario . Zechner . 22 June 2014 . 13 February 2016.
  38. Web site: libGDX 1.3.0 released . badlogicgames.com . Mario . Zechner . 9 August 2014 . 13 February 2016.
  39. Web site: libGDX 1.4.1 released . badlogicgames.com . Mario . Zechner . 10 October 2014 . 13 February 2016.
  40. Web site: libGDX 1.5.0 released . badlogicgames.com . Mario . Zechner . 8 December 2014 . 13 February 2016.
  41. Web site: libGDX 1.6.0 released . badlogicgames.com . Mario . Zechner . 6 May 2015 . 13 February 2016.
  42. Web site: libGDX 1.7.0 released . badlogicgames.com . Mario . Zechner . 21 September 2015 . 13 February 2016.
  43. Web site: libGDX 1.8.0 released . badlogicgames.com . Mario . Zechner . 5 January 2016 . 13 February 2016.
  44. Web site: libGDX 1.9.0 released . badlogicgames.com . Mario . Zechner . 24 January 2016 . 13 February 2016.
  45. Web site: libGDX 1.10.0 . libgdx.com . damios . 18 April 2021 . 19 April 2021.
  46. Web site: libGDX 1.11.0 . libgdx.com . damios . 11 May 2022 . 12 May 2022.
  47. Web site: libGDX 1.12.0 . libgdx.com . damios . 2 July 2023 . 24 July 2023.
  48. Web site: Starter classes & configuration - libGDX . libgdx.com . 18 January 2022.
  49. Web site: libGDX 1.8.0 . badlogicgames.com . Mario . Zechner . 5 January 2016 . 11 January 2016.
  50. Web site: Libgdx goes HTML5 . badlogicgames.com . Mario . Zechner . 12 March 2012 . 17 May 2016.
  51. Web site: Reflection in libgdx's GWT backend . badlogicgames.com . Mario . Zechner . 19 January 2013 . 17 May 2016.
  52. Web site: Reflection API with GWT support! . badlogicgames.com . Mario . Zechner . 17 June 2013 . 17 May 2016.
  53. Web site: Using libgdx with other jvm languages . libgdx.com . 18 January 2022.
  54. Web site: gdx-ai/README.md . . 12 October 2015 . 16 January 2016.
  55. Web site: Artificial Intelligence . libgdx.com . 18 January 2022.
  56. Web site: Gdx freetype . libgdx.com . 18 January 2022.
  57. Web site: Box2d . libgdx.com . 18 January 2022.
  58. Web site: libgdx/packr: Packages your JAR, assets and a JVM for distribution on Windows, Linux and Mac OS X . . 6 February 2016.
  59. Web site: Packr – pack your libGDX app for Windows, Linux, Mac OS X . badlogicgames.com . Mario . Zechner . 4 May 2014 . 6 February 2016 . 27 April 2020 . https://web.archive.org/web/20200427100900/https://www.badlogicgames.com/wordpress/?p=3428 . dead .
  60. Web site: Road to the IGF: Mega Crit Games' Slay the Spire. Couture. Joel. www.gamasutra.com. 22 January 2020 . en. 2020-01-22.
  61. Web site: Patch notes - Wildermyth Wiki. wildermyth.com. en. 2022-08-23.