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

Creating custom asset loaders

Other than the already mentioned default loaders for the built-in asset types in Libgdx, you can implement your own loaders for other asset types you need to manage. When beginning work on this recipe, it is a good exercise to think about what types of custom assets you might need to define.

Some games require their actors to interact with each other and the environment. They are perfect candidates to make use of physics properties and bodies.

2D/3D animations are also a good example. It is necessary to store frames, duration, and so on.

The possibilities are endless. The preceding information about physics and animation can be stored in files in such a way as to load it at runtime.

Creating custom assets might seem complex, ...

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