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

Skin customization

Your current progress on the Scene2D topic allows you to develop a simple UI application without investing a huge effort. However, if you intend to program a more complex game with lots of UI shared assets, you will easily get yourself into a mess.

Skins are the wonderful solution to pack all your UI data into one simple JSON file adding to the aforementioned advantages of using an atlas.

As tends to happen with the data-driven approach, it requires an initial effort that turns into awesome commodities and facilities for the future.

Getting ready

The code for this recipe can be found in the SkinCustomizationSample class within the samples-core project. Please do not forget to visit it in order to run and play with the live example. ...

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