3

I have a cocos2d (cocos2d v1.1.0-beta2b) ipad game which has graphic files of 1024x768.

Therefore i don't enable [director enableRetinaDisplay:YES].

The game looks great on non retina ipads with very crisp graphics but looks blurred on ipad retina.

When i open the same 1024x768 images that are displayed in the game simply in the photos app, they look great on the ipad retina too.

What am i missing here? What should i do in the code to make them crisp in the cocos2d game too?

Thanks

AJ222
  • 1,114
  • 2
  • 18
  • 40

2 Answers2

2

You are NOT just missing retina graphics.

What you're experiencing is the default Bilinear scaling which causes everything to look blurrier than it would on iPad 2 when testing on iPad 3.

To fix this, you want to force Nearest Neighbor as shown in http://www.cocos2d-iphone.org/forums/topic/using-nearest-neighbor-scaling-for-retina-display/

By calling

[[CCDirector sharedDirector] openGLView].layer.magnificationFilter = kCAFilterNearest;
[[CCDirector sharedDirector] openGLView].layer.contentsRect = CGRectMake(0.0001, 0.0001, 1, 1);

in your AppDelegate

(As stated, only run this on iPhone 4 or iPod touch 4G and above: iOS5+)

You'll then be able to enjoy crisp non-retina graphics on iPad3

Guykun
  • 2,780
  • 23
  • 28
-3

You're simply missing Retina graphics. You need to provide all images in double resolution with -hd or -ipadhd suffix. And of course enable Retina mode.

The photo app probably just does a better job at upscaling the lowres images.

Note that Apple now requires developers to use Retina assets. Apps that don't (yours) will not be approved!

CodeSmile
  • 64,284
  • 20
  • 132
  • 217
  • Are you sure about that? Do you mean that all apps that don't have ipad retina gfx look blurred on ipad retina? Also, did you hear about an ipad app the got rejected because it didn't have retina assets? (i find it very hard to believe as it increases the app size majorly and apps that are under 50mb will become much much more) – AJ222 May 27 '13 at 07:22
  • Yes, if you display a 1024 image on a 2048 display of course it will look blurry. And yes, Apple requires Retina assets, it's been in the news. See the comments here: http://stackoverflow.com/questions/16180745/does-apple-now-require-all-ipad-apps-to-be-retina-screen-ready and news http://news.cnet.com/8301-13579_3-57575810-37/apple-nudges-developers-to-make-taller-retina-apps/ – CodeSmile May 27 '13 at 11:38
  • Is there a way to upscale it nicely like the photo app does? – AJ222 May 27 '13 at 14:44
  • @LearnCocos2D, nope apple not reject if iPad retina supported!! just we need to use 2048x1536 default image and 2048x1536 image in appStore screen...few days back accepted http://itun.es/i6xj8mG iPhone HD, no iPad HD :) – Guru May 27 '13 at 16:54
  • maybe you just got lucky ;) – CodeSmile May 27 '13 at 19:46
  • Did you hear about an iPad app that got rejected for not having ipad hd assets? – AJ222 May 28 '13 at 06:43
  • No, I hardly ever hear about apps being rejected unless it's for some odd or hypocritical reason. What we do know is that Apple demands proper Retina support, and that's what we should do. Not doing so is a gamble. – CodeSmile May 28 '13 at 07:10