Physics-based Animation not in a game? Great idea!

Was reading this post discussing Facebook Home and how they use a physics engine to drive animations (Nice site design, BTW), and got inspired. I mean, Apple provides quite a lot of APIs for us to use as iOS programmers and it’s easy to forget to think outside the box when they make things just so convenient.

Next time I have the chance, I’m going to try to make some prototypes with Chipmunk Physics, one of the 2 physics engines that is packaged with the Cocos2D Framework and the one I personally prefer since it’s really straightforward, really high performance, and has an Objective-C wrapper which keeps everything in a familiar flavour. I already know how it works thankfully, due to the work I did on my very first piece of self-made software, BocceBeers! (**note: I made BocceBeers years ago for iOS 3.x and haven’t updated it since… sorry.)

The question is, how do I tie into the run loop or do I just schedule a repeating NSTimer that updates the simulation? Research time!

(UPDATE: The Author of the library posted this to github that should form the basis of the work. Now it’s just about setting up interesting physics underneath and figuring out interacting the the objects.)