Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For instance, the Motorola Droid is as wide as the G1, but has more height.

Should I try to spread the UI out across the extra height found on the Motorola Droid? How do others handle this problem?

I'm not using OpenGL, but a SurfaceView for a 2D game.

share|improve this question
up vote 6 down vote accepted

Be aware of density independence (basically resolution) as described here:

And as related to aspect ratio, pick your minimal target aspect ratio and design within it as sort of a safe frame. When confrontend with wider aspect ratio, show more of the game which is not critical to gameplay. I have posted a similar question here and described what I'd do:

share|improve this answer

You can do the dynamic resolution which I show here on the iphone:

  • Make sure you place everything with ratios. For example a health bar would be placed at 80% of the screen width with 10% of the screen width for its horizontal scale (refer to CSS styling dimensions). It's a little weird in the beginning but you won't have to deal with all the different resolutions in the long run as your widgets/images will move dynamically with different screens.

  • If your game uses picking translate that too with ratios (you need an original set dimension which you can use as reference to build ratios with the device dimensions.

share|improve this answer
The article is not reachable anymore! – bottleboot Aug 27 '15 at 21:31
Just tried, working on my end. Refresh? Maybe my hosting company was restarting its servers. @bottleboot – namar0x0309 Aug 28 '15 at 21:51
my ad blocker was stopping the page load, i can see it now – bottleboot Sep 19 '15 at 10:40

If you are using eclipse, you can have several different sized images put into the drawable-ldpi, drawable-mdpi, and drawable-hdpi and the android engine will automatically choose which image will be appropriate for the screen resolution.

share|improve this answer
What does eclipse have to do with that? – stephelton Nov 26 '11 at 19:45

Keyframe mentions a good approach, but I'll offer two more:

1) Design your game for multiple resolutions/aspect ratios. The idea is to take advantage of every bit of the screen real estate, but "design out" any advantages that one aspect ratio might have over another. Depending a lot on the game, different aspect ratios may still have an advantage over others, so you'll want to keep that in mind for things like multiplayer matchmaking, leaderboards, achievements, etc. if any of these are relevant.

2) Use the extra space for more HUD / chroming. Pretty much what Keyframe said as far as having a baseline or minimum resolution supported, but instead use the extra space for something other than the game action.

The big disadvantage with the second approach is that if you take something very square-ish as your "safe zone," you leave a lot of unused / unintentionally used pixels in a widescreen setup.

share|improve this answer

Chosing the optimal resolution for a game from the start of development can reduce headaches with porting later on.

The "best" resolution depends on a lot of factors:

-The platform the game is supposed to be released on first

-Other possible platforms you plan to port to later

-Graphical fidelity (An 8-bit or pixel art game doesn't need to be hi-res.)

-Genre (A puzzle-game can probably get away with a lower resolution, but a high-speed competitive FPS might not.)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.