iPhone or Android?

I am not really interested in the fight between iPhone’s and Android’s aficionados, I believe that they are two different platforms generating products with different specifications and targets. Anyway, I would like to share the following bit by Nick Farina (via Daring Fireball) on a difference in how iPhone and Android handle animations:

[Android]’s rendering system, that is, the method by which UI widgets like menus and buttons and such get painted on the screen, is primarily software-based.

What does that mean? Let’s take the screenshot above as an example. If you pressed the Down key, you would expect the “Homepage” entry to be selected instead of “Go to.” So you press the Down key. This causes an “invalidate,” meaning, “please repaint the screen.” So the screen is cleared, then:

  1. The OS redraws the status bar at the top
  2. The WebView redraws the Google.com website
  3. The Menu draws its translucent black background and border
  4. All the menu text is drawn
  5. The blue gradient highlight is drawn over “Homepage.”

This all happens very quickly, and you only ever see the final result, so it looks like just a few pixels have changed, but in fact the whole screen must be reconsidered and redrawn.

If this sounds familiar, it’s because this is the basic method used in GDI, the rendering system introduced with Microsoft Windows 1.0. That sounds damning, but really most GUIs operated this way.

Until the iPhone came along…

When you’re using an iPhone, you’re playing a hardware-accelerated 3D game. You know, the kind of 3D where everything is made out of hundreds of little triangles.

[…]

Which is a long way of saying that everything on iOS is drawn using OpenGL. This is why animation on iOS is so hopelessly fast. You may have noticed that -drawRect is not called for each frame of an animation. It’s called once, then you draw your lines and circles and text onto an OpenGL surface (which you didn’t even realize), then Core Animation moves these surfaces around like pulling on the strings of a marionette. All the final compositing for each frame is done in hardware by the GPU.

Android seems to have made the decision early on that they wouldn’t force their manufacturing partners to include a GPU. This decision made total sense back in the pre-iPhone days, but now it’s causing pain, as even the new hardware acceleration in Android 3.0 is limited by the original software-based compositing system.

So, yeah, how many hundreds millions people do really care about this kind of snobbish geek blah-blah? Certainly, I do…

Cloud Lock-in

Drive: are we human or ... ?

An impressive piece of visual communication about what motivates our behaviour and the importance of autonomy, mastery, and purpose. This is based on a speech of David Pink’s, so it is spelled in highly “economic-ist” terms, but it is easy to see the deep meaning of those words.

The best interactive books for iPad

I have been working lately on a project for an interactive book for the iPad (more on this in the coming months, I hope). Now, the definition of interactive book is still quite fuzzy, so that products that you find labelled as such may not always correspond to your expectations for the word “interactive” (this is an euphemism to avoid saying explicitly that many of them are pretty delusive and quite possibly not worth the money they cost). Anyway, a few of such interactive books are, IMO, really impressive, both for their general quality and for the work that went into defining what “interaction” could mean in something that is not exactly a book, nor a game, nor an animated comics.

Fast grid effects for Cocos2D on the iPhone

Cocos2D is a widely used framework for building games for iOS, as it provides a consistent, game oriented, higher-level interface to the OpenGL-ES iOS underpinnings. Cocos2D sports many basic features that are a real life-saver when it comes to squeezing the last FPS from your device or optimizing memory usage, while also offering advanced features that would cost you some effort to implement on your own.