Allegro.cc - Online Community

Allegro.cc Forums » Allegro Development » [A5] Question/note regarding iOS

This thread is locked; no one can reply to it. rss feed Print
[A5] Question/note regarding iOS
Chris Katko
Member #1,881
January 2002
avatar

I'm looking into various optimizations, data driven design, and so on.

Anyway, I found that in iPhone 2G/3G and iPod Touch 1G/2G, they use an ARM II processor with optional floating-point unit. They say optional because it's turned off by default in what's called "Thumb Mode." Any time you call a float operation, it turns off Thumb Mode (and enables the FPU), and then shuts it right back off--unless you compile it by with the "Thumb Mode off" option. This ends up drastically affecting performance of typical 3-D games.

http://gamesfromwithin.com/break-that-thumb-for-best-iphone-performance

and

http://gamesfromwithin.com/360idev-cranking-up-floating-point-performance-to-11

I'm not sure how much Allegro does with floating-point numbers internally, but I figured I'd bring it up.

Additionally, you could add a note to the system specific docs telling people to remember to set that configuration. I would imagine many people using Allegro on iOS wouldn't have too much in-depth experience with iOS game development.

[edit] Well, it looks like (with me being the exception!) very few people still have [1/2/3]G phones and iPods, at least compared to the masses. So I guess you can negate this. But it could be important for people targeting older phones.

from http://david-smith.org/iosversionstats/
{"name":"7argdd4.png","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/1\/1\/11724b7ccad3e3ce95916ec7b7f2e693.png","w":733,"h":754,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/1\/1\/11724b7ccad3e3ce95916ec7b7f2e693"}7argdd4.png

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

Polybios
Member #12,293
October 2010

That's why Allegro still supports fixed point maths. :)

beoran
Member #12,636
March 2011

Ah, yes, I almost forgot! We still have fixed point math in Allegro 5 as well, although you'll have to convert to floating point after performing the calculations to interact with most of allegro's API. Interesting to see how those old routines became useful again when architectures without math coprocessor came in vogue again. It was definitely a good idea to keep these!

https://www.allegro.cc/manual/5/al_fixed

Go to: