content scale factor value for running iPad (non retina graphics) on retina iPhone (960 X 640)

Hi There,

So i have 1024 X 768 resolution graphics in my project.
I would like to use these graphics for iPhone retina (960 X 640) as well.

I have set setDesignResolution to 1024, 768, ResolutionPolicy::Show_all.
Content Scale Factor to : 960/1024.

But the output is not correct.
Can anyone tell me what content scale factor to use so as to use iPad (non retina) graphics on iPhone retina screen (3.5inch and 4 inch)

Hi Rakshak,
try FixedWidth or FixedHight ResolutionPolicy as per your game orientation.

Hi Paresh,
thanks for your feedback.
i will try the change in resolution policy but what am i suppose to set the content scale factor as if I’m using iPad graphics …

There is no need to play with scale factor in most of the cases. I will suggest, first you go through HelloCpp example in cocos2d-x sdk, chk AppMacros.h along with AppDelegate files & set your settings as per your requirement in this sample example(for example using BG image from your actual game). Once it perfect over there use it in your game. From ipad to iphone retina, it will never get perfect unless you set policy to kResolutionExactFit (but it will stretch the images so not suggested). Better you go for kResolutionFixedHeight or kResolutionFixedWidth depending on your game resolution. either width-wise or height-wise some part will get cropped, which is suggested to consider in designing of the game.

But dude, in the hello cpp example they change the content scale factor in every if clause.
check that.
they do change that setting. otherwise designresolutionsize would not work by itself.

thats true but u not need to change that code, for now you can just change resolution policy to kResolutionFixedWidth for sample example & see if you can get expected result. here hight is getting cropped from top & bottom, but thats a good way to go with if ur in landscape mode.