Chapter 7. Asset Management

In this chapter, we will cover the following recipes:

  • Getting to know AssetManager
  • Asynchronous asset loading
  • Creating custom asset loaders
  • Managing groups of assets for bigger games

Introduction

Assets are an intrinsic part of games in the sense that their mixture defines the final game experience and highly contributes to players' opinions.

Most modern and successful games make use of a variety of assets such as textures, fonts, music, sound effects, skins, particle effects, maps, physics, and so on. The asset ecosystem can be very demanding of memory resources.

In this chapter, we will learn how to efficiently manage any kind of asset in your Libgdx applications through the built-in AssetManager class, even when the amount of resources increases unexpectedly. In this way, we will save valuable time and memory. Moreover, you will learn how to interact with the user while the load is in progress.

At the beginning, you will find AssetManager an extra complication, but later, you will think of it as a faithful ally. Your code will be more readable and succinct because it will be independent of data.

It is an essential feature whose flexibility allows you to customize its usage according to your needs.

At the end of this chapter, I suggest you go beyond and try to put it into practice.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.188.152.136