Book Image

Mastering LibGDX Game Development

By : Patrick Hoey
Book Image

Mastering LibGDX Game Development

By: Patrick Hoey

Overview of this book

Table of Contents (18 chapters)
Mastering LibGDX Game Development
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Implementing asset management with loading textures and tile-based maps


The next class to review is Utility, which can be found at core/src/com/packtpub/libgdx/bludbourne/Utility.java. The Utility class represents a placeholder for various methods including dealing with the loading and unloading of game assets.

Utility

The class diagram for Utility (Figure 7) shows the attributes and method signatures for our implementation:

Figure 7

The import packages for Utility are as follows:

package com.packtpub.libgdx.bludbourne;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.assets.loaders.TextureLoader;
import com.badlogic.gdx.assets.loaders.resolvers.InternalFileHandleResolver;
import com.badlogic.gdx.maps.tiled.TiledMap;
import com.badlogic.gdx.maps.tiled.TmxMapLoader;
import com.badlogic.gdx.assets.AssetManager;

Since LibGDX is built upon OpenGL, we need to understand some nomenclature from OpenGL in order to properly understand how certain classes work...