CLM logo Development Blog by CLM

Living in a 60 FPS world

When we released the first version of Anodia we received a few questions about frame rate in our games. To be honest, our target was to have solid 30 FPS on almost every possible device (unfortunately first and second gen devices tend to be a little slower). It seemed that achieving more FPS would be very complicated, especially as some parts of our framework were not prepared for this (i.e. using frames instead of time deltas).

As a first step we decided to check if it’s worth effort at all. We changed hard-coded FPS from 30 to 60 and I personally was shocked — game was running at double speed, but all menus were perfectly smooth! GUI is completely time based so it was possible to make comparison on two devices.

Our logic was already decoupled from rendering, but it was driven by the same TaskManager class. The tricky part is that TaskManager updates were handled by NSTimer with 1 ms interval. It was time to finally use CADisplayLink and trigger rendering from there. After fixing some bugs in TaskManager and implementation changes in Renderer we were able to get 60 FPS without changing game logic (still updated 30 times per second).

This is when the real fun begins — at this point everything looks the same as in 30 FPS, time to interpolate. Framework required adaptation in GUI, ParticleSystem, FadeIn/FadeOut transitions. Just take value from the previous and the current logic update and do linear interpolation to get value in between.

When framework was ready for 60 FPS, updates in Anodia started — after changing bonus manager (those falling down bonuses) and game objects handling most levels are working perfectly fine. There are only a few that require some manual tweaking. As we were aiming in 30 FPS in the beginning, sometimes performance is a bottleneck, but it seems that this should be not so difficult to fix.

What does this mean for players? Anodia and Hexbee updates are coming soon, including smooth 60 FPS on iPhone/iPod with Retina Display and all generations of iPad. Unfortunately we are not able to test it on iPhone 3GS so no promises for this device.

If you are interested in this topic, Noel posted an interesting article that made our quest to 60 FPS a lot easier.

The New iPad’s Retina Display

Since the Apple keynote about the new iPad I was wondering if the Retina Display is really going to be that big of a deal. I mean, I know it’s great on the iPhone 4 and the newest iPod touch, but those are the devices that you held a lot closer to you eyes so it makes a huge difference there. As it turns out, from the moment I turned the new iPad on, I knew the answer. Retina on the iPad is just great. But let me show you this on a little example from our game Hexbee which already fully support the new Retina display.

On the left you can see the little part of the screenshot taken on the old iPad, and on the right the new iPad. The difference is stunning. And with the new iPad Retina you can really see a whole new level of detail like on the following screenshot:

That donut looks really yummy! Below you can follow the evolution of the donut from the old iPhone and iPod touch without Retina (on the left) through iPad and Retina iPhone and iPod touch (center) to the new iPad (right):

The problem with perceiving the difference is that the new iPad and the old iPad have screens of the same size, but the old iPad have a lot less pixels there (not to mention, our screens have less pixels). For me, the best way to see that difference is to scale the old iPad screenshot up to the size of the new iPad. It really looks like the picture below (yet it’s not so big, obviously).

I hope that clarifies the importance of the new iPad Retina display — for me it’s most certainly is its killer feature.