O'Reilly logo

Libgdx Cross-platform Game Development Cookbook by Alberto Cejas Sánchez, David Saltares Márquez

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

Managing groups of assets for bigger games

I am pretty sure that you will find yourself an authentic master of the Libgdx AssetManager class after going over this chapter as you are now able to load and unload whatever you want, whenever you want, but wait! It means that you will have to manage all the resources that will appear in your game one by one. Definitely, masters don't like to work on repetitive tasks that can easily lead to errors.

Undoubtedly, the answer is to group assets. This is why we will tweak the default Libgdx AssetManager class a little bit in this recipe. Group organization might vary depending on the scope and type of game, so it is up to you to decide whether you will group per level, characters, menus, and so on, and what ...

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