dweezil,
I should modify my last statement slightly: I now have my game looking good in all devices from iPhone3/4 to iPad to GalaxyTab… but not perfect. As you’ve discovered, it’s nearly impossible to get a game to appear the same on all devices. Android’s screen, in upright portrait orientation, is annoyingly “tall” in my opinion, while some people complain that the iPad screen is annoyingly “wide”.
If you haven’t read this blog post, do so first… it explains the issue in great detail:
http://blog.anscamobile.com/2010/11/content-scaling-made-easy/
For my game, I opted for the “zoomEven” scaling because I don’t like letterboxing with black bars (or, as the blog suggests, filling the black bar region with redundant images or something). However, it totally depends on the type of game. For some games, “letterbox” is the superior solution, and there are no black bars because the game has been designed to make them appear as part of the background. For a scrolling background game, as mine is, letterboxing simply is not a good solution.
Basically though, I decided to use a 2:3 screen ratio as in iPhone3/4. 320x480 or 640x960. This 2:3 ratio is an acceptable median between the taller and wider screens of Android and iPad, respectively. I then used the built-in functions that read the device screen size (i.e. display.viewableContentWidth) to determine the center of the screen, then I placed my overall content centered around that axis. As a result, and with the use of “zoomEven” scaling, some content gets clipped off the top/bottom on iPad, and some content gets clipped off the left/right on Android/Galaxy (assuming portrait configuration). It’s a minor sacrifice in both cases, and totally acceptable considering the game will look perfect on all 2:3 ratio screens.
Anyway, read the blog post and hopefully that helps… just remember, there is no perfect solution! Even Ansca’s “magic recipe” isn’t a perfect solution for all games, although it certainly works perfectly for many people.
Brent
[import]uid: 9747 topic_id: 4196 reply_id: 13379[/import]