DZone
Mobile Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Mobile Zone > cocos2d vs. iPad 3

cocos2d vs. iPad 3

Alex Curylo user avatar by
Alex Curylo
·
Mar. 12, 12 · Mobile Zone · Interview
Like (0)
Save
Tweet
3.95K Views

Join the DZone community and get the full member experience.

Join For Free

Got a cocos2d iPad game out there? Might want to check it out with the iPad 3 simulator, NOW –

More Pixels Equals More Panic

Like a good little Apple dev, I downloaded the newest XCode and iOS Simulator to test out my apps. The rest of the cocos2d community was doing the same and that is when the excrement came in contact with the bladed cooling device. Devs started to report that their apps were showing a black screen on the iPad 3 simulator. More reports were coming in of other strange behaviour…


The patch presented in the post is probably not one you want to use in the long term, as faking out cocos2d’s retina display detection was a side effect of repurposing iPhone retina assets for normal iPad,

The solution to the problem was a bit of an accident. I wanted to create universal apps that took advantage of the iPad’s resolution without needing new assets. With careful asset management and a few hacks it is easy to use your Retina iPhone assets on the iPad. This helps you reduce your app’s footprint and take advantage of additional pixels. DOUBLE RAINBOW!

The method that I use is partially outlined in this forum post. It adds a makeUniversal method to CCDirector which you call immediately after instantiation of the director in your app delegate. Here is the code:


… but hey, if you just want to submit an emergency patch RIGHT NOW so that all those new iPad 3 customers won’t be posting “it doesn’t work” reviews on launch day, the techniques pointed to there should get you through the crisis!

h/t: @iUridium via @romainbriche!

Cocos2d

Published at DZone with permission of Alex Curylo, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • The Power of Enum: Make Your Code More Readable and Efficient [Video]
  • On Architects, Architecture, and Failures
  • Spring, IoC Containers, and Static Code: Design Principles
  • How to Build Microservices With Node.js

Comments

Mobile Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo