cocos2D iOS 6 retina display - cocos2d-iphone

I'm using cocos2D and TexturePacker. My game is working correctly with iOS < 6. Since I upgraded to iOS 6, my images are displayed 4 times bigger in retina.
Looks like it is displaying retina images without compressing it by 4.

Related

How to get the exact screensize of an iPhone 6 or 6 Plus

I am using cocoas2d-x V3.0. I tried
Size screenSize = CCDirector::getInstance()->getWinSizeInPixels();
but it returns the size of an iPhone 5 (640 * 1136), while I am testing on iPhone 6 or iPhone 6plus simulator.
You need to get cocos2d-x v3.3 because the previous versions of cocos2d-x do not get the correct screen resolution for iPhone 6 and iPhone 6 plus because they still think that the scale factor is 2 instead of 3 and hence return the iPhone 5 resolution.
This issue has been talked about at this link: https://github.com/cocos2d/cocos2d-x/issues/8545
You need to add Launch images for Iphone 6 & 6+ , only then
it will show you its real screen size.
Go to your Xcode -> Select Target -> Select General ->
select Launch Image Source under App Icons & Launch Images .
Now you can add there your launch images for iphone 6 & plus
which could be 1334*750 & 2208*1242 For landScape mode.
Now you can have your device screenSize with following code .
Size WinSize= Director::getInstance()->getWinSize();
i have faced same thing in my project & this way i solved it.
i am using Xcode 6 & cocos2d-x 3.2
I hope this helps.

A strange frame rate with actions on retina iPad only

Using actions with cocos2d v2.0 it works perfect on all iPhones and regular iPad. but when testing the same code only on iPad retina simulator ,when the button is a x2 bigger, so all actions (scale,move etc) are seems like they missing some pixels in their movement( for example a moving sprite is go 1 -3 -5 instead of 1-2-3-4-5 , seems like low frame rate or jump pixels)
There is no memory issue, its just a simple page with simple action :
id action=[CCScaleTo actionWithDuration:0.5 scaleX:0.95 scaleY:1.1];
id action1=[CCScaleTo actionWithDuration:0.5 scaleX:1 scaleY:1 ];
id seqb=[CCSequence actions:action,action1, nil];
id forever=[CCRepeatForever actionWithAction:seqb];
[play runAction:forever];
Why is it happens only in the retina display? does actions are not have the resolution for iPad retina -so they jumping on pixels ?
Do i have to enable the retina somewhere ? (it does get the -ipadhd image as retina and resize it)
EDIT EDIT
I have read that :
Slows down the iPad retina simulator 6.0
and could see that maybe the mac processor is not handle that .
Well thats strange , i have the new macbook retina ,it has a strong processor, and i am sure more than an iPad, so how is that true that iPad can handle it but not the mac ?
ignore the simulator, test on an actual device.
Note that the ipad retina simulator is really slow which is likely causing this issue.

Cocos2d-x high DesignResolution and iOS simulator display bug

I'm currently building a game with cocos2dx 3.0 alpha0 in c++. At the moment I'm building for iOS.
I tried to set the "DesignResolution" at 1280 by 1920 (Which is double the iPhone 4 resolution) so I can have the graphics look good on iPad retina. Everything works fine on the devices but when I try to run it on the iPhone and iPad simulator I get three quarters of the screen rendered black. This happens whether it's iPhone, iPad or iPad retina simulator. When I tried to reduce the DesignResolution to 640 by 960 it shows fine on the simulator.
Does anyone have any information on this issue? How can I fix this rendering issue on the simulator?

Why is the orientation wrong on the 6.0 simulator but fine on iPhone 4 (4.3.3)?

I was testing my cocos2d-iphone 1.0.1 game on an iPhone 4 with iOS version 4.3.3. It is a landscape mode game.
I recently updated Xcode to 4.5.2, and it comes with iOS simulator 6.0.
If I run my game on the simulator (Hardware set to retina iPhone 4), the device window rotates to the expected position, but the game itself seems to be rotated 90 degrees to the right. The touches also seem to be caught rotated. So basically, I have the device window in the correct orientation but the game itself is rotated.
When I run this on the iPhone 4, it all works just fine.
What could have happened?
This solved it: Cocos2D with iOS6 faulty rotation
Just had to use the Cocos2d 1.1 link, which is: https://github.com/cocos2d/cocos2d-iphone/blob/develop/templates/Xcode4_templates/cocos2d.xctemplate/AppDelegate.m

What changes should I do to my cocos2d-iphone 1.0.1 project to run it on iPhone 5?

I've been developing a cocos2d-iphone 1.0.1 game project and have been testing it on an iPhone 4.
I'll soon be getting an iPhone 5. I just updated Xcode to 4.5.2.
Will my project be able to at least run on the iPhone 5 immediately? Or is there a major change I must do in my project? As in, is something going to crash when I try to run it?
If you don't do anything, the app will run on iPhone 5 at the original resolution. Meaning there will be empty (black) space on the sides.
Once you add an image named Default-586h#2x.png with dimensions 640x1136 then your app will use the entire width of the iPhone 5 screen. You will have to adapt your layout to support the iPhone 5 screen size.
It should be able to run on the iphone 5 immediately but it will probably be letter boxed since im guessing it does not support a taller screen size yet.