How to run my game on ipad(1024x768) ?

How to run my game on ipad(1024x768) ?
0.0 0


I hava finished a simple game with cocos2d-x , and it’s run perfectly on iPhone3GS and iPhone4.

Now I want to run the game on ipad, as we know ,the resolution of iPad is 1024x768.

My plan is as follows:

1.Change the size of the view to 1024x768.


(Actually,Walzer has told me…a little…I didn’t solve it because I don’t know how more details….)

But I don’t know how to change the size of the view and some other things to change.

Is there someone did this ? Please tell me .Thank you very much.


It’s the same to cocos2d-iphone.
New images in ipad resolution, and new coordinates are required.
On ios, the EAGLView is created to fit fullscreen by default, in YourGame/ios/, you can ignore this.


Do we use retina display on iPad or not?
I mean the texture atlas file does it need to be with -hd suffix or just the regular texturename.png and texturename.plist ?

Thanks for all your nice work!


Now only iphone has retina display.
So you can just use regular texturename.png and texturename.plist.



One more question: will iPad 3 follow the same approach as iPhone4. I mean will there be an retina display for iPad to have the iPad3 double resolution available with a texture like: texturename-ipad.png ?


Yes I think iPad3 will be the same just like iPhone.


one question: we want to reuse the hd resouces(960*640) on iPad, and i follow a solution here
which cheat the system to run retina mode on iPad. It create a EAGLView with size 480*320 and set it’s transform to scale 2.0f.
but that solution doesn’t work on my machine, the view’s size is only one quarter of the screen and stay at the bottom-left corner. I don’t why?
And if i want to use the hd resources on iPad, is there an easy way?


`Fernando The solution will break on iPad3 anyway- because on iPad3 you can set content scale. And running a 320x480 view sounds really scary.

Better to use this approach - which uses HD images and centers them on the iPad

This will work for iPad3 if you not enable retina in your AppDelegate.cpp, too.
#define CC_IS_IPAD() (CCDirector::sharedDirector()>getWinSizeInPixels.width1024||CCDirector::sharedDirector()->getWinSizeInPixels().height1024)
if) pDirector


Thanks Herman! i will have a try.