iPhone 4 and 480x320 games

Member
Posts: 241
Joined: 2008.07
Post: #1
I've got a game that's ready to ship that was developed with the 320x480 iPhone configuration in mind. All the textures are 512x512 (nearest power of 2), and the area of the texture that I'm using for the game background is 320x480.

With the iPhone 4 being 640x960 (exactly twice the size), will those old games still show up on the iPhone 4 appropriately? Is there any step I need to take in code to ensure the view is scaled up appropriately? Is it automatic? Is it even anything to worry about?

Thanks!!
Quote this message in a reply
Member
Posts: 87
Joined: 2006.08
Post: #2
It is entirely automatic. Your content will render at 320x480 pixels, and be scaled to fill the display. To do anything other than that requires explicit opt-in on your part.
Quote this message in a reply
Member
Posts: 353
Joined: 2002.04
Post: #3
On this topic, does it render the screen pixel-doubled like the iPad? I've heard a few reports that games designed for 480x320 look terrible on the Retina Display. I would have thought pixel doubling wouldn't look too bad, but if it used some sort of interpolation instead then everything could look very blurry.
Quote this message in a reply
Moderator
Posts: 1,560
Joined: 2003.10
Post: #4
There's no interpolation. The iPhone 4's pixel doubling works exactly as you'd expect (from the user's perspective, at least; fixing your app to render at native resolution isn't as straightforward as you might think!).
Quote this message in a reply
Member
Posts: 353
Joined: 2002.04
Post: #5
Thanks for the clarification ThemsAllTook. Without meaning to hijack this thread too much - what have been other devs strategies for dealing with iPhone 4 resolution textures for non-3D elements like menus, HUDs etc? Do you simply use a higher resolution texture which is scaled down for 480x320 resolution devices? Is it worth the extra file size this would entail?
Quote this message in a reply
Moderator
Posts: 3,574
Joined: 2003.06
Post: #6
(Aug 4, 2010 07:57 PM)monteboyd Wrote:  Without meaning to hijack this thread too much ...

This is anything but a hijack IMHO. I, for one, am very interested in this discussion Wink
Quote this message in a reply
Member
Posts: 81
Joined: 2007.07
Post: #7
(Aug 3, 2010 06:26 PM)monteboyd Wrote:  I've heard a few reports that games designed for 480x320 look terrible on the Retina Display.

This is the placebo effect. In theory a 480 game should look better on the retina display because of better color saturation and the display is actually better. Resolution wise it should be exactly the same as 3gs since you are displaying 480 pixels across the exact same distance on both devices. I have no doubt that a 960 upgraded app does look better, but for any game where things are moving a lot you aren't going to see much of a difference, I would much rather play a 480 60fps game then a 960 20fps one. The 960 is total overkill for games IMO, its more about marketing than anything else. The lemmings will follow.
Quote this message in a reply
Member
Posts: 353
Joined: 2002.04
Post: #8
I've been getting a new app ready for 640x960 and 320x480 graphics from the outset and have been reading the docs here.
So I have no problem manually setting the contentScaleFactor to 2.0 and retrieving the width and height of the render buffer, but to determine if the app is running on an iPhone 4 (or future devices) do I have to use a method like this one?
Quote this message in a reply
Member
Posts: 87
Joined: 2006.08
Post: #9
monteboyd, you shouldn't be hardcoding a value for contentScaleFactor. Rather, you should be querying [UIScreen scale], and doing something reasonable with that value (often just using it as-is).
Quote this message in a reply
Member
Posts: 353
Joined: 2002.04
Post: #10
Fantastic! Thanks Frogblast, that's exactly what I needed to know.
Quote this message in a reply
Nibbie
Posts: 1
Joined: 2010.09
Post: #11
Unfortunately guys it IS true that upscaled games look worse on the Retina display than a 480x320 native device.

The Core Animation layer that backs the OpenGL view does the upscaling, and it does a poor job (blurry result). Unless Apple switches CA to use a better interpolation method, or just straight 2x scaling, or an app is updated to specifically support 960x480, i4 owners are stuck with blurry games.
Quote this message in a reply
Sage
Posts: 1,482
Joined: 2002.09
Post: #12
I know 4g owners are crying foul that developers aren't rushing out with free updates for their $1 games so people can feel good about their expensive phones, but seriously, it's barely noticeable.

Also, I've never looked, but I would suspect that CA has a setting that allows you to control the interpolation method so you could use nearest neighbor instead of linear filtering.

Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Quote this message in a reply
Sage
Posts: 1,482
Joined: 2002.09
Post: #13
calayer.magnificationFilter = kCAFilterNearest

I would suspect that setting that on the EAGLLayer would make the upscaling look quite a bit sharper.

Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Quote this message in a reply
Member
Posts: 81
Joined: 2007.07
Post: #14
(Sep 21, 2010 01:04 PM)sticktron Wrote:  Unfortunately guys it IS true that upscaled games look worse on the Retina display than a 480x320 native device.

The Core Animation layer that backs the OpenGL view does the upscaling, and it does a poor job (blurry result). Unless Apple switches CA to use a better interpolation method, or just straight 2x scaling, or an app is updated to specifically support 960x480, i4 owners are stuck with blurry games.

Well, 3d fps type games will look better interpolated, any sprite based game though will probably look a lot better straight scaled, my guess is there is a lot more of the latter than the former.
Quote this message in a reply
Nibbie
Posts: 3
Joined: 2010.08
Post: #15
I don't have an iphone4 to check it myself. And i wonder if it is generally possible to have a kind of blown up mode where 480 x 320 are just blown up to 960 x 640? (kinda like an iphone app on ipad)

In Unity3 in the Player Settings / Other Settings / Target Resolution is a dropdown list where you can choose 1. Native (default device resoltion), 2. Standard (medium or low resolution), and 3. HD (highest available resolution).

my hope is that if i choose 2. Standard (medium or low resolution) i get a 480 x 320 blown up to 960 x 640 on iPhone4.

Is that right? Can anybody with an iPhone4 verify that?
babyliss pro nano titanium
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  what iPhone device versions to target for physics based games? mixedup 3 1,434 Sep 30, 2013 01:22 PM
Last Post: mawigator
  Music bitrate for ipad and iphone games Bambinou 5 9,723 Nov 19, 2011 07:02 PM
Last Post: fugufish
  Why bluetooth games do not work on iPhone 2G? riruilo 13 8,861 Mar 31, 2010 07:53 AM
Last Post: alibaba123
  New iPhone Games from Skyworks? Dement 0 2,204 Mar 18, 2009 05:07 PM
Last Post: Dement
  Advertising iPhone Games bridgeyman 5 4,945 Aug 7, 2008 12:41 AM
Last Post: kodex