So I've started to check out what's involved in making games on the iPhone, you know like OpenGL ES, Open AL etc - the usual stuff... In amongst my fooling around, I've started to create a Vector class for doing some basic physics. While I was researching how to do that correctly, I came across a realization. The ARM processor of the iPhone and iPod Touch doesn't have an FPU (Floating Point Unit) so to get any decent performance out of a game, i'll have to get to grips with Fixed Point maths (again).

If you're looking to get up to scratch on that too, this might come in handy.

There's a helluva lot to learn for anyone making the move from the desktop to the iPhone... Well it's not as simple as a lot of people have made it out to be.

I think this is the most geeky post i've ever written.

Update: Thanks to John in the comments. Looks like iPhone does have an FPU.

3 Responses to “fixed point arithmetic on the iPhone”

  1. Beddardo:

    Jeeesus Christ man… and I thought revising GCSE maths was bad! What the hell does all that stuff mean?

  2. Andrew:

    I haven’t a clue… My geekiness is just an act…

    ;-)

  3. John Bowers:

    I don’t think that you are completely correct, sir. The consensus among our fellow devs is that unless you’ve boiled it down to floats being your speed problem keep using them and don’t bother with fixed point stuff b/c the iPhone does, in fact, contain an FPU.

    I’m looking for article’s to back me up but having trouble (probably thanks to the f*ing NDA):

    http://toucharcade.com/2008/07/07/under-the-hood-the-iphones-gaming-mettle/

    or:

    http://forum.beyond3d.com/showthread.php?t=42496

    (search for “floating point unit” on the page)

    I’d love to see what you’re working on OpenGL-wise…

Sorry, comments are closed for this article.