O'Reilly logo

Learning Libgdx Game Development by Andreas Oehlke

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The demo application – time for code

In this section we will take a closer look at the actual code of the demo project. Thereafter, we will do some simple modifications to the code and also use the debugger.

Inspecting an example code of the demo application

Let us take a first look at the generated code of MyDemo.java from the demo project.

The following code listing shows the class definition:

public class MyDemo implements ApplicationListener {
  // ...
}

As you can see the MyDemo class implements the ApplicationListener interface. Before we move on to the implementation details of the interface, we will spend some time on the remaining part of this class.

You will find a definition of four member variables, each with a class provided by Libgdx.

private ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required