开发者

What's the Best Way to Support the Multiple Art Sizes Currently Used by iOS?

Currently iOS supports three different art sizes: art for the 480x320 original iPhone screen, art for the hi-res 960x640 iPhone 4 screen, and art for the 1024x768 iPad screen, which in my experience is usually not the same as for the hi-res screen because of the different demands placed upon the different aspect ratio of the screen.

In a worst case, you could include three sizes for all of your artwork, and that's exactly what I did for the main element (cards) of my last game. However, it's ultimately wasteful in both download time and my time in creating them all.

What would y'all suggest as the best way to deal with the different requirements of the different iDevices? Here's a few general possibilities that I'm considering:

  1. Include artwork in all 3 sizes.

  2. Include artwork in just 1 size (the big one), but resize it on the fly as UIImages are created.

  3. Include artwork in just 1 size (the big one), but make resized copies of it the first time a user starts up your app.

There are of course variants involving using some techniques for just some sizes (e.g., share artwork between the two big sizes开发者_Python百科, slightly resizing as needed). I'm interested in which method you'd use, with notes on the pros and cons of doing so. I expect the biggest cons are going to be: file size and any lag that might be caused in display or resizing of the objects. One of my biggest unknowns is how good of a job iOS does if you let it do the resizing, both in output quality and in timing.


I'm currently using artwork in all 3 sizes. If your artwork is in vector format and designed for both the iPhone and iPad aspect ratios, it's a simple batch action to create all 3 at the same time.

If you just include the highest resolution, the memory usage might be a problem with older iOS devices which have less memory to work with. The image quality and speed of resizing is not an issue, since both are excellent, if you let the OS resize the images. For me, I don't want to have additional code to handle resizing the same image for different devices. Otherwise it sounds like having just the large artwork and making sure it's resized correctly will be fine.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜