Big Bucket Software you like to use
Retro 8-Bit Retina Display Support
October 6th, 2010

The Incident 1.2 includes Retina display support. That doesn’t make much sense at first glance. The explanation has everything to do with the point at which the graphics are doubled.

On an iPhone, I present all of Neven’s artwork at 2x. That means 4 pixels are used (2×2) for each 1 pixel in the artwork.

The Technical bit:

There are a couple of points in the graphics pipeline where I could do the doubling. I could draw everything to the OpenGL UIView at 1:1 and then double the size of the UIView (specifically, the UIView’s underlying CALayer). But this is not what I do. Instead, I configure glOrtho with a rectangle that it is half the size of viewport. The projection is then stretched out to fill the viewport.

What’s the difference?

When the doubling is done this way, it is the OpenGL vertices that double in size, not the pixels. This means that the pixels can be smoother/crisper. If, instead, the UIView was doubled, then OpenGL would draw to the surface and then the drawn pixels would be enlarged.

On a Retina display, the drawing surface is twice the size of a regular iPhone. To support this, I configure glOrtho with a rectangle that is a quarter the size of the viewport.

The non-technical bit:

Here’s what it would look like if I didn’t do any glOrtho messing about at all. This is what it would look like if I only doubled the UIView:

Crunchy. Here’s how it looks currently, using glOrtho/glViewport scaling on an iPhone:

And finally, here’s what it looks like in 1.2 on an iPhone 4:

The first thing that should stand out is the word CARGO. It’s crisp and clear without a hint of “furriness”. The outline of the items are also super smooth. And look at that fridge! Just gorgeous.

Update: Added layer scaling example.

  • Nice, just one question. Are you using the exact same pictures to both versions? Because that seems like a huge improvement just with that technique but anyway looks much better. Looking forward for this update

  • Yes, same textures in both versions. If the items weren’t rotated, they would look identical in the before and after. But because of the rotation, the extra pixels of the Retina display make them clearer.

  • At first, the idea of high-resolution 8-bit graphics kind of messed with my mind. I couldn’t see how something that’s SUPPOSED to look old, can still look new, or more refined.

    Now I understand. Thank you and I’m very excited for this update!

  • cesarerasini — 3:55 am on 7.10.2010

    8bit graphics on a display with more than 300 dpi? Incredible. I love it.

  • […] ampiamente (e tecnicamente) descritto in un post sul blog di Big Bucket, nonostante si tratti di un gioco volutamente pieno di pixel le differenze […]