Adapting graphics to various resolutions

A complex subject to handle while writing a game is the Android screen size fragmentation. Low-end phones have resolutions of a few hundred pixels, whereas some high-end devices provide resolutions of more than two thousand.

There exist several ways to handle various screen sizes. We can adapt graphic resources, use black bands around the screen, or apply and adapt responsive designs to games.

Another simple solution consists of rendering the game scene off-screen with a fixed size. The off-screen framebuffer is then copied onto the screen and scaled to an appropriate size. This one size fits all technique does not provide the best quality and might be a bit slow on low-end devices (especially if they have ...

Get Android NDK Beginner's Guide - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.