Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm learning iPhone development and a friend will be doing the graphics/animation. I'll be using cocos2d most likely (if that matters).

My friend wants to get started on the graphics, and I don't know what image resolution or dpi or formats are recommended.

This probably depends on if something is a background vs. a small character.

Also, I know I read something about using @2x in image file names to support high res iphone screens. Does cocos2d prefer a different way? Or is this not something to worry about at this point?

What should I know before they start working on the graphics?

share|improve this question
1  
Step One is to accept answers.. your percentage is pretty low... it doesn't encourage others to answer your questions. –  Nate Feb 6 '11 at 20:46

1 Answer 1

up vote 4 down vote accepted

I can't speak to anything Cocos2D related, but for UIKit you want your images to be 72 DPI. The iPhone, iPhone 3G and iPhone 3GS have a native resolution of 320 x 480. The iPhone 4 has a native resolution of 640 x 960, which is exactly double the size of the older devices.

To make it easier for developers, they play a trick with how graphics are handled in iOS. You don't deal in Pixels, you deal in "points". The iPhone screen is 320 x 480 points, no matter what model it is. If you have an image that's 320 x 480 pixels, it's drawn at native resolution on the iPhone 3G, and it's doubled to fill the size of the iPhone 4.

To get even more clear images on the iPhone 4, you can also provide @2x images that are the correct size to match the native iPhone 4 screen. As an example, if you have an image called AvatarIcon.png on your app that's 100 x 50 pixels. You could also create on called AvatarIcon@2x.png that's 200 x 100 pixels. Now you get a crisp image on both the iPhone 3G and the iPhone 4.

Make sense?

share|improve this answer
3  
For cocos2d you should use -hd as suffix instead of @2x. So use AvatarIcon-hd.png rather than AvatarIcon@2x.png. Source: cocos2d-iphone.org/wiki/doku.php/… –  bummzack Feb 7 '11 at 7:52

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.