480 x 320 on iPhone4?

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?

Thanks!

That is correct!

Thanks !!!

I confirm that it’s working on my 4g as well , choosing Standard( Low / medium res )

Does blowing it up make is blurry, or quality is kept 100% intact because it’s straight up doubling of resolution?

in my case that doesn’t give any difference and I am using only sprite / 2D artwork.

as long as you target 480 * 320 res from start i don’t think you get any issue

If the resolution isn’t forced to low res then it is high res no matter how big your textures are.
I could imagine that it might become a frame rate issue with many sprites with alpha in several layers covering big parts of the screen. I just experienced really extreme frame rate drops on the iPad.
I guess that the graphic chip of the iPhone4 didn’t became 4 times stronger. So if you experience frame rate drops and your artwork is anyway made for the low resolution it makes sense to force the iPhone4 to use the low res.

You can determine the res (in the installed app on the Iphone4) if you add this script to a GUIText object.

function Start() {	
   guiText.text = Screen.width + "x" + Screen.height;
}

Cannot tell for the iPhone4. Only for the iPad (opening an iphone app that is forced to be low res and pressing the 1x/2x toggle). But i guess that it will be the same for the Iphone4.
It would be cool if was blurred a bit. But it is not (or at least doesn’t look like). it looks like straight doubled (using 4 screen-pixels instead of 1).

No, actually it would suck ass.

480x320 on the iPhone4 looks fine imo, its pretty much indistinguishable from an older device (except the retina display has way better color accuracy). There’s no blurring or other nasty artifacts, its just a clean pixel doubling.

That said, I would just author your stuff for the retina display’s native res. In my tests, the iPhone4 holds up far better at full res than the iPad. I’m not really sure why this is the case, since the hardware is almost identical, but I’ve been pleasantly surprised at how speedy it is.

Area is the issue…

960x640 is 4x the area of 480x320… Ipad is 5.2x the area, which means it’s an additional 30% amount of pixels to draw…

So, 30fps on an iphone 4 suddenly becomes 20ish fps on fill rate. :confused:

My game supports 480x320 and now I want compile my game. Should I choose “only iPhone” or “iPhone + iPad” as target device. Is 480x320 playable on iPad ?

In Editor when I use iPhone 4G Wide-Screen, the position of the touch buttons will be doesn’t stretched. Is this OK so ? How it works on iPhone 4 with touch positions when you define your touch-button areas for 480x320.

Use iPhone only, the the iPad will stretch it by itself. Otherwise you’ll have to support the iPad’s resolution.

thanks

I have defined my touch positions with:

MyButton=Rect (380,0,100,100);

In Editor this works only correct when I use iPhone Wide (480x320)
When I switch to iPhone 4 Wide then the touch-positions are not correct.
Should I calculate the positions for all devices with…

MyButton=Rect (380 * (screen.width/480.0),0,100 * (screen.width/480.0),100 * (screen.height/320.0);

??

Not sure if its relevent to your tests but the iphone4 has double the ram of the iPad, and the iPad has 200mhz faster CPU clock. So that would make them both slightly better at different tasks.

RAM wouldn’t effect raw rendering performance like this. It’s definitely a symptom of having to draw more pixels, as JTBentley pointed out, the iPad screen represents a good deal more area. Even though the iPhone 4 is very high res, clearly that extra 30-ish% still makes a huge difference…

@Gaspedal - I’d highly recommend calculating your on screen buttons in a resolution independent manner. Personally, I’d recommend using colliders and raycasts, rather than checking hard-coded rectangles.

I use a 16x16 black texture on a guitexture (turned off), and it’s totally set with transform (so its pixel width/height are 0,0)… This makes the hit-zones res independent :slight_smile:

However, I still build a hero scene (typically for iphone), then once the app is ‘finished’, i clone that and make it a Retina/iPad version.

The gamelogic typically will be identical script for both, but with some obvious modifications here and there (for example, I keep a cached Vector2 of the middle of the screen for gun code, which of course is totally different on all 3 devices) :slight_smile:

hi guys,

i dont really get it with the screen resolution
i just upgraded to unity3, i have an iphone 4 and when i ckeck low/medium red in player settings, my labels are displayed as if i were in high res with unity remote. i can tell by their position on the screen
any idea?

the remote has nothing to do with the screen size handling on the device.

if you want to have that kind of handling on the remote, change the defacto screen size of the game window

always keep in mind: the remote renders the image as it was rendered in the game window. the remote does not execute any game code at all

ok tnks it works fine on actual device