3
votes

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

2
I think this is a programming question.AJ222
There are many other sites like Stack Overflow... This is a graphic design question... there is a site for that here: graphicdesign.stackexchange.compattyd
No this is not a graphic design question at all...AJ222
oops, sorry! I didn't see that code in there! Sorry!pattyd
This is actually a programming question, and may have something to do with OpenGL. +1s.bandara

2 Answers

2
votes

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

-3
votes

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!