Phone resolution and button size

Hi,

What resolution would be best to set for a Androd/Iphone game? So the game can rescale nicely to all screensizes. And how can I know the my buttons has a good size on most devices?

Looking at this chart you can see that nowadays even iPhone itself has both different resolutions and more importantly screen ratios.
There is no standard way to set this but preferably you would want to aim for some standard ratio that a lot of mobile devices have, say 16:9 . Then you could set whatever resolution you’d like as it Defold will scale it to fit your screen (eg. 320 x 568 )

Now whenever you create a gui object you will get a frame showing you where the size goes of the screen. This way you can hopefully tell when dragging in buttons if they are too big or not.

To be able to have good cover for all devices you still need to consider how you would like to handle other ratios than your normal one. There are lots of different ways to do this but I usually “lock” one axis (as in Blossom Blast Saga we locked down the vertical axis) meaning that however “thin” or “fat” the ratio becomes, the vertical content will look exactly the same. BUT the horizontal will show more background as the ratio getting fatter and showing less background as the ratio is thinner.

One suggestion is (for a portrait mode game) to set your resolution to what I earlier said (320 x 568) as it is a 16:9 ratio.

There are very few devices (if any? I havent seen any) that have a thinner ratio than that.
This means that all you put in that scene will be visible on all devices. But as they are getting fatter you need to have a wider background and the game content will be centralized on these mobile devices.

3 Likes

Thank you Andreas_Jirenius. This helped me a lot.