Android Resolutions and Scaling

Starting a little libgdx android project, and I was wondering about resolutions

now all devices can have different resolutions obviously…

so the kinda rhetorical question is do you scale ? So your source material is big enough and you scale down ?

at what resolution would you develop then ? different devices may also have different display aspect ratios, right ?

whats the standard to deal with this ?

I believe that there was a post about this some time back.

Basically, you have a few options. The ‘best’ in my view is to pick the size your comfortable with (Your phone’s?) and then scale from there.

As for the ratio? The method I understand is to use some sort of ‘border’ system, that will paint a border of some sort on the edges that are outside of the aspect you wrote the game for.

You should always position HUD/GUI/etc in relative terms (for e.g. relative to the edge of the screen) to make your game aspect-ratio-independent.

As for different sizes, this is a design issue. Non-artists and certain programmers might just want to scale the game’s assets, but this is a poor design choice.

“It’s simply not possible to create excellent, detailed icons which can be arbitrarily scaled to very small dimensions while preserving clarity. Small icons are caricatures: they exaggerate some features, drop others, and align shapes to a sharp grid.”
All the sizes of iOS app icons

Simply scaling down:

Better practice, re-designing the assets for different target sizes:

Another thing to consider: do you want to support full-screen on desktop?

  • If you don’t care, then just design your game with a fixed size. The differences between Android/desktop will be minimal.
  • If you do want full-screen support, you’ll likely need a significant redesign of your game/assets/HUD/layout/etc.

For the latter, consider how web designers strip a desktop website down to a mobile website. They take away superfluous elements, emphasize certain aspects of it over others, etc. You might be able to learn something from these articles:



Use Camera’s viewport.
http://code.google.com/p/libgdx/wiki/ProjectionViewportCamera