Jan 29

If you look at the source code for Cocos2D, you will find this little note in Director.m:

	// XXX it's using hardcoded values.
	// What if the the screen size changes in the future?

This isn’t a problem if you want to run your iPhone app in what I call “boxed” mode – in it’s native resolution on the center of the iPad screen. But if you want to start working on your code in the native iPad resolution of 1024 x 768 you will need to get the latest build (SVN r1753).

See this thread: http://www.cocos2d-iphone.org/forum/topic/4108

Screenshot

Note that the controls are now properly scaled. Obviously one pending issue is substituting a background graphic with the proper resolution.

iPad app using hacked Cocos2D engine

Tags: ,

3 Responses to “Getting Cocos2D to work with the iPad”

  1. Tweets that mention Hacking Cocos2D to work with the iPad -- Topsy.com Says:

    [...] This post was mentioned on Twitter by Garry Seto and Javier, Derek van Vliet. Derek van Vliet said: Hacking Cocos2D to work with the iPad #ipaddev #iphonedev http://ff.im/-f4sPf [...]

  2. Makzan Says:

    Hello, I’ve worked on several projects on cocos2d before and now trying to work on iPad. The latest svn version is r1808 but it still have the “What if the the screen size changes in the future?” line and there is no setReferenceResolution in ccDirector. May I ask the how you get it done? You can email me for the discussion. Thanks a lot.

  3. Makzan Says:

    Sorry for bothering you.I just found that I have to transit the xcode project to universal for running native resolution.
    Thanks

Leave a Reply