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

Putting it all together

We will now begin to fill the stub methods with some life. The game loop is a good starting point as it is our driving engine that keeps the game world updating and rendering in a continuous way. After that, we will add some sprites and verify that the updating and rendering mechanism is working fine. In order to manipulate the world and game objects, controls are added to receive and react upon user input. Finally, the CameraHelper class will be implemented to allow us to move around freely in the game world and to select a game object of our choice that the camera is supposed to follow.

Note

Additions and modifications in code listings will be highlighted.

Building the game loop

The game loop will reside in the CanyonBunnyMain ...

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