Retina and Performance
Could someone please explain to me what the power of two and divisibility by four is all about...Really wanna get retina display right this time around as well as great performace
Is it a good idea or bad idea to leave RI unchecked and just simply scale up your imgs?
Is it a good idea or bad idea to leave RI unchecked and just simply scale up your imgs?
Comments
If you enable Resolution Independence in GS, you make your graphics twice the size (or rather same size, double the ppi, i.e 144) as those for pre-iPhone4. Then the iPhone4 will display your graphics at the size you want but higher resolution; any before that will still be the correct size but displayed at a resolution of the usual 72ppi.
I've not tested out Resolution Independence within GS; so possibly it might not like image size you want/144dpi even though that is the same as double the size you want/72ppi; a quick experiment would solve that as to which one GS accepts (possibly both). A bad idea; if you are not enabling Resolution Independence in GS, than bring in your images into GS the size you want, at a resolution of 72dpi as usual.
hope that cleared it a bit for you. :-)
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
So say I have a 120x120 image, and the actor that will be using that image is 60x60. You're saying its a bad idea to insert the image into GS as 120x120 and drag it in to the 60x60 actor, and leave RI unchecked? Wouldn't that image be displayed as high res?
So instead I should just scale down the 120x120 image to 60x60, bring it into GS, check RI, and then the image will be displayed as high res (120x120) on retina supported devices and normal size (60x60) on older devices?
Sorry for being so specific, I just really want to fully understand how this all works
With RI on it should display the 60x60 image on older devices and the 120x120 on new devices capable of retina.
Darren.
Choice 1: you want your game to run, lets say, on an iPhone 3GS, which will also run on an iPhone4. But you're not fussed about taking advantage of the iPhone's higher resolution, displayed on it's new, sooper-dooper Retina Display. This is like you're making a game, like you've always done with GS, and as if the iPhone4 DIDN'T have the capability of a higher resolution than those that go before it. with this choice, you simply ignore "Enable Resolution Independence" on the GS Project page, i.e leave it unchecked. Then bring in your graphics to the size you want, again as you've always done, the size you see is the size you get, 72ppi.
Choice 2: again you want your game to run on all the iPhones, past and present but you want to take advantage of the higher resolution images that can be displayed on the iPhone4. With this choice, check Enable Resolution Independence on the Project Editor page, but bring in your images at twice the size as you want, at 72ppi.
The rest is done for you, automatically, depending on which phone is being used. If it's a pre-4 one, it'll halve the size of your doubled images, making them the size you want, and ignore any resolution info; be seen as 72ppi.
On the iPhone4, the resolution will automatically be doubled, so halving the size of your images, also to the size you want, but show on the Retina display at a better resolution.
hope that's made it clearer for you. :-)
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
One more thing: How bad is checking RI in terms of memory usage and project file size, whats the impact of it?
Darren.
I tried starting two new apps, one with RI unchecked, and one checked -
under device > Screen > size both register as 420 x 580?
is that the size I should make my background at for this to work?
another question - will the larger images be used if the app is run on an iPad?
As an iPad user myself, I'd like to support the greatest number of possible systems for my new apps.
The multiple of 4 is an RI thing. which stems from the even number thing for non-ri
Standard Res to avoid blurry images all you need to do is even numbers that way if it lands on half a pixel it doesnt split a pixel and make it blurry.
Resolution independence requires a double sized image so you want your actor to be a multiple of four so when high res is displayed you don't get a pixel split in to making your art blurry.
Remember your actor needs to be a multiple of 4 then double the size. if you make your art a multiple of four and then half it for the actor it is possible to end up with an actor that is not a multiple of 4.
Now Power of 2 is a whole different beast.
First for example i'll list some powers of two.: 2,4,16,32,64,128,256,512
Now what the power of 2 for art size does is determine how much memory is used for an image.
64x64 is the largest image size you can use for that determined memory size. but 60x60 will use the same and 68x68 will use the same memory as 128x128
This is solely a performance thing nothing to do with display quality like the multiple of four is for RI.
Im my example it would be advantageous to reduce the art and actor to fit a 64x64 size as opposed to leaving it 68x68 you are technically cutting the memory usage in half for that image. so if you have a bunch of them you could actually improve performance for a barley noticeable change in actor/image size.
I hopt that helps people understand this a little better.
So many user questions could be solved by better documentation
so assuming that i am starting my app as "iPhone portrait",
should my graphics be 420 x 580, or twice that?
(I'm making the entire interface, which will fill the screen, in PS and AI beforehand.) The aspect ratio IS slightly different, so some space is wasted on the iPad screen when running iPhone games, but not much. Unless you want to $ell two versions, I think to just make one universal app for all.
I wasn't really factoring in the iPad in my question above.
With my fullscreen images at 960x480, I haven't noticed any performance or memory problems, but I have noticed that the images are compressed a fair amount with noticeable banding. That's definitely something I want to get rid of, and I wasn't sure if the dimensions I have the image at is the cause or not.
I'm going to do 640 x 960 landscape from this point.
But why does it say 420 x 580 in "Game Salad Creator"
Under Game / Devices / Screen / Size I wonder?
I guess that technically a "universal app" is one that automatically adjusts to either device, eh?
What I meant was the fact that "iPhone" apps work perfectly well on iPad, but not vice versa.
(So, do iPhone4 apps run at full retina resolution on an iPad, btw?)
ha, all this is STILL much easier than dealing with a million semi-compatible windows machines. ;-)
If it's the latter, and you have follow the power of 4 and 2 rules, I assume that on the iPhone 4 it will up-scale the scene automatically, and as the images are actaully sized for 960 x 640, they don't loose quality?
I'm just trying to understand this, and what actual scene size you should be using.