Hello everyone
I need some advice on differing screen resolutions, I’m at the end of finishing my game and now I’m tweaking it.
I’ve written the game using the droid screen resolutions (wide screen) in the simulator throughout.
But now I’m in a pickle as what to do about these other device screens, like the kindle fire and i-phone 4 which have squarer screen dimensions.
For example, I have a row of 11 buttons across the bottom of the screen, each 110 pixels wide, fits nice on wide screen devices but they get squashed together on the square devices.
From my tinkering around it looks like the only option is to reduce the size of the buttons for these square devices, I can’t just make the buttons small in general because they are too small on higher resolution screens.
So here are my 3 questions.
-
Do I make another set of smaller images and use them if the device is squarer?
Problem with this method is that my game already has over 300 images and I don’t want to go over the 50mb limit and you have to consider the @2x versions too. -
Is it OK to resize the images in the code?
from this
local squareButton = display.newImageRect( “images/Button.png”, 110, 110 )
to this?
if (screen is square) then r = 0.75 else r = 1
local squareButton = display.newImageRect( “images/Button.png”, 110*r, 110*r )
Would this have an impact on the image quality? Is it bad practice? -
Do I need @2x images for Android only builds or are those prefixes specifically for i-phones?
I’ve read a lot of topics on this subject and there seems to be an issue with detecting screen resolutions on all devices so I’m a little concerned about how to implement question 2 - if (screen is square) .
I’m sure there are experienced programmers out there who deal with this on a regular basis and already have games out there so if you could tell me how you handle this issue it would save me a lot of precious time.
Many thanks in advance.
Martin.