Page 1 of 1

iSortMachine (iPhone)

PostPosted: Sun Jul 19, 2009 5:49 pm
by PeskyJ
iSortMachine was just released on iPhone over the weekend, it uses Chipmunk in a fairly interesting way. The game has two view types on the same screen, a top-down area and a side-on area. As such it uses two separate chipmunk spaces to manage the objects.

The objects on the conveyor belt are in the top-down space, this is implemented with high damping (a low value) and gravity is used to speed up and slow-down the conveyor belt. The tokens actually "fall" down the screen rather than ride the conveyor belt and you can pick them up and drag them about, pushing other tokens around as you do so. The texture-translation used on the conveyor is taken from an invisible object in the same space so that its movement matches the tokens.

When the tokens fall off the bottom, or get dropped or flicked off the side of the conveyor belt they are removed from the top-down space and placed into the side-on space where they fall and pile up at the bottom of the screen. Their shape also changes from circular to rectangular. The accelerometer is used to adjust gravity for this space, so you can shake the pile down or tilt it to move the pieces around.

It's my first project using Chipmunk and my second iPhone app - I certainly plan to use Chipmunk again, it was really easy to get up and running with it. I've seen a lot of people asking about how to do top-down simulations and this is just one example of that. Anyway, let me know if there are any questions and if you have an iPhone buy it and I hope you enjoy it. I put a credit for Chipmunk in the about page too with a link :)