Getting Started with libGDX, a Cross-platform Game Development Framework

Developers who want to develop and debug code on the desktop, natively yet be able to run it on multiple OSs without modification will want to know about libGDX. LibGDX is a Java* game development framework composed of a unified API that works across several platforms. It currently supports Linux*, Windows*, Android*, iOS*, Mac OS X*, and HTML5.

You can find the official documentation here.

To use libGDX, applications must be written in Java. If you have questions about using libGDX, a handy forum is available.

The first step is to set up your development environment. You can read about it here.

In addition to installing Eclipse*, Android SDK, JDK, and ADT plugin, you need the Gradle tooling for Eclipse (see Eclipse-Integration-Gradle project at

In Eclipse, go to Help > Install New Software:

libgdx fig 01

Install all applications:

libgdx fig 02

Next, create a libgdx project:

To install libGDX, download the gdx-setup.jar here.

After downloading and installing libGDX, you will see this window, allowing you to configure your project.

libgdx fig 03

Fill out the form and click the “Generate” button. You are ready to import a project into your IDE.

In Eclipse you can import your project with the series of commands Import > Gradle > Gradle Project:

libgdx fig 04

On the next dialog, click the Browse button and find the root of your project. Then click Build Model:

libgdx fig 05

Eclipse will download different packages that are needed and build the project. If no errors occur, you will see:

libgdx fig 06

Your project is ready for you to work on.

Since I only chose one OS in the project setup, my project contains only two packages: the FirstLibGDX-core package is for the logic of your game. And the FirstLibGDX-android package contains the code for Android activities.

Para obtener información más completa sobre las optimizaciones del compilador, consulte nuestro Aviso de optimización.