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

More effective rendering with regions and atlases

Creating Texture objects from different image files and rendering them with SpriteBatch is the most straightforward way of building scenes with Libgdx. However, it is far from being the most efficient one. Games are real-time, performance-critical applications, and writing efficient systems becomes even more important when dealing with resource-limited platforms such as tablets, phones, or browsers.

Surely drawing a handful of individual images is not going to make a massive impact when running the game on a high-end phone with a dedicated GPU. However, the landscape can rapidly change the second we add different backgrounds, dozens of different characters on screen, particle effects, and so on. ...

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