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

Handling multiple screen sizes with viewports

The diversity of devices users play games on is vast and overwhelming, especially when targeting different platforms including phones, tablets, and browsers. This presents a lot of challenges for developers. Hundreds of different specs, processing power, screen sizes, APIs... It is a real mess. When it comes to games, it is not only the programmers who are affected, but designers, animators, and artists are also affected. The same level may not look the same on two devices and both level layout and assets need to cater for that.

Nowadays, it is not rare at all to find a situation like the one shown in the following figure:

There is a range of strategies to tackle the varying screen resolution and different ...

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