Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multi-resolution development - how to?

I am developing an iOS app in starling for all ios devices. I am having a hard time getting my head around how to use the AssetManager class and scalefactor setting to manage all the different resolutions.

I think the official article (http://wiki.starling-framework.org/manual/multi-resolution_development) from starling and the scaffold project leaves a lot to be desired - it does not even take into account the retina iPad.

I can easily set things up so i can distinguish between iPad and retina iPad or iPhone and retina iPhone, but how can i combine the two and still be able to setup the app in a way that is manageable?

Any links to tutorials or articles on this topic would be great.

like image 992
fideldonson Avatar asked Nov 02 '22 19:11

fideldonson


2 Answers

here is the link for great tutorial series on developing multi resolution app.

http://my.safaribooksonline.com/9781449320904/ch01s25_html?readerfullscreen=&readerleftmenu=1&reader=

like image 133
Jack Torris Avatar answered Jan 04 '23 14:01

Jack Torris


I ignore the starling scalefactor and AssetManager, and write my own Assets and Global class. At application startup I check the device resolution and set Global.scale to 2 - if iPad 3+, 1 if other, <1 - if something weird like iPhone 3. That way my Assets class knows which textures to load and with what scale to create textures out of images. I Also use Global.scale for any numbers like text size or padding by multiplying by scale. I had to write a bit of reused code by myself but it was worth in my opinion, because I can change anything I like to make it even better with every release of starling.

like image 32
kosmo Avatar answered Jan 04 '23 15:01

kosmo