Today I grabbed an iPhone4 – not quite at the price you get it in the US or the UK, and that gave me an immediate opportunity to judge the work I did on Antistar to support so called retina display.
For reminder, development started on an iPod 2nd gen. If you followed this blog on and off, you already know that getting the game to run at frame rate on the older iPods has been a constant struggle. Then I bought an iPad, and an iPhone 3GS along with it. The original plan was to do a separate version for the iPad, and performance tuning on the 3GS. The ‘iPad project’ sat in a cupboard for 8 to 12 weeks.
Optimizing for 3GS and iPod 3rd gen
On the 3GS, it became clear very quickly that there was spare processing time. Since I had already implemented depth of field (DoF) balancing (less details in the background when running out of processing time), this translated immediately into… more detailed images.
But I still felt I hadn’t reached the limits. So I figured a way I could introduce antialiasing without directly relying on the GL (remember multisampling is a late addition on iDevices), and that turned out to be rendering on canvas 1.5x as big as the screen, and letting the system resize and antialias the picture.
Well. That looked pretty good, and the game was still running very smoothly. Adding antialiasing did cause the DoF balancer to kick in at times, but nothing like the iPod 2nd gen.
The ‘Retina incident’
Now we get to the part that finally cost me nearly a $1000 (that’s what I got mine 4!) and somehow produced, as a collateral, a universal app running on all devices.
I postponed getting iOS4 on any of our devices. I also postponed getting the latest SDK. Seriously, if you’re about to release a game, what do you want? Do you want to fix all the bugs, then look into device / OS specific issues, or do you want to make a mess?
The first big surprise came from the iPhone4 simulator, and a short email clearly indicating that all iPhone games would run on the iPhone4 anyway.
Surely I did want to support the retina display (and the game does!). That still left me guessing what the performance of the device might be. With vague echos suggesting that the iPad and the iPhone4 ran pretty much the same hardware, the best way to have a try must be to run the game on an iPad. So I migrated the build to universal, and got to work.
At this stage, I was in for the second big surprise, and not a good one: given a bigger screen size, the iPad’s horsepower is worth something between the iPhone3GS and the iPod touch when it comes to 3D rendering (assuming you take away GPU optimizations, and I don’t have that running yet). Meaning…
…meaning that the DoF balancer kicked in much earlier on the iPad than it did on the 3GS. Kind of regrettable considering we have a much bigger screen, providing a more immersive experience, somewhat at the expense of having to handle a heavier, clumsier device.
And then what, well, this is what I did:
- Disabled antialiasing on the iPad. the game looked beautiful in a different way, and surely ran smoother and better than on the 2nd gen iPodTouch. No great loss then (and no negative feedback from players).
- Limited the canvas size to 1.5x iPhone – quite the same as the 3GS, but not rendered quite in the same way. Instead of antialiasing by blending pixels, we’re running somewhat under the maximum definition.
Where the user experience comes in…
Players reported that the iPhone 4 renders ‘just a little better than the iPhone’. If you’re comparing with an iPhone 3GS, this is necessarily true. We get a picture that’s just a little more crisp on the iPhone4. Other players asked me if the game really supported retina display. And it really does! But not quite in the way mip-mapped textures or a 2D game would look on your iPhone4.
I don’t feel my players on iPhone 4 are very happy. The truth is, they’d rather have less depth of field (and not know about it), than have less definition. Because increased definition is what they dropped the buck for.
So what’s left for me to do is drastically improve the engine performance. Because I don’t want anybody to feel they don’t get what they paid for.
Oh my. think about it, it’s a $3 title and it needs to run on a screen that’s 4 to 6 times as big as your PS3′s telly.

