Different resolution screens - fitting move objects on bigger screens

EDIT:  Sorry title should say more… not move!

Hi,

I was hoping someone can point me in the right direction…  Im aware that corona handles dynamic scaling if images, etc using the @x notation but my question is more about developing specifically for different resolutions i.e. phones vs tablets.

An example will probably be better…  I have a game that uses a grid of tiles like a chess board.  On a phone, i can probably fit around 8x8 and still have the tiles big enough to touch…  Now, with dynamic scaling (if i undersatnd correctly)  on an ipad for example, I woulds still see the 8x8 grid only with bigger tiles…

Say for example I had a grid of 16x16… on my phone (iphone) I would need to use a scroll view to keep the tile a decent size to touch… However, on an ipad i could quite easily fot the entire 16x16 grid on the one screen.

What is the best way to acheive this?  My initial thoughts are that I’d have a threshold so when a device is over a certain resolution I’d draw more tiles but not sure how this works with retina displays (in terms of you can have a high resolution but a small screen)… should I be looking at ppi instead?

Hope the question makes sense

Many thanks! :slight_smile:

If you want to have your code fire off different behaviors for different screen sizes, you should check out Rob’s tutorials on ultimate config files:

www.coronalabs.com/blog/2013/09/10/modernizing-the-config-lua/

Hi,

Thanks for the reply… Apologies but i’m not sure how I can accomplish what I need using that article?  It seems to be geared towards the automatic scaling of objects which isnt quite what i’m after… I’m after getting more objects to be drawn when the screen can fit them on without them being too small to touch.

Maybe I am misunderstanding the blog post you are referring to? 

Many thanks for you time,

Cheers

You have your code fire for different resolutions. 

display.contentWidth > x then

create 16 tiles

display.contentWidth < x then

create 8 tiles

If you want to have your code fire off different behaviors for different screen sizes, you should check out Rob’s tutorials on ultimate config files:

www.coronalabs.com/blog/2013/09/10/modernizing-the-config-lua/

Hi,

Thanks for the reply… Apologies but i’m not sure how I can accomplish what I need using that article?  It seems to be geared towards the automatic scaling of objects which isnt quite what i’m after… I’m after getting more objects to be drawn when the screen can fit them on without them being too small to touch.

Maybe I am misunderstanding the blog post you are referring to? 

Many thanks for you time,

Cheers

You have your code fire for different resolutions. 

display.contentWidth > x then

create 16 tiles

display.contentWidth < x then

create 8 tiles