O'Reilly logo

Mastering LibGDX Game Development by Patrick Hoey

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

Implementing the camera and displaying a map in the render loop

The next class to review is MainGameScreen, which can be found at core/src/com/packtpub/libgdx/bludbourne/screens/MainGameScreen.java. The MainGameScreen class is the first Screen implementation for our game and represents the main gameplay screen used to display the game map, player avatar, and any UI components.

MainGameScreen

The class diagram for MainGameScreen (Figure 8) shows all the attributes and method signatures for our first pass:

MainGameScreen

Figure 8

The import packages for MainGameScreen are as follows:

package com.packtpub.libgdx.bludbourne.screens; import com.badlogic.gdx.Gdx; import ...

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