I'm using the glorious chipmunk library in an iPhone game, and I want to save the state of the space on exit.
I do so by using SpaceManager (as well as storing other relevant values) when the app terminates, and it works perfectly. The only problem is that the app-terminate callback is only called a second or so after the home button was pressed, causing the game to save a state about a second ahead of when the user decided to quit. This can be problematic when the user re-opens the app and suddenly the game is over (this is a fast-paced game!)
My question is if it is possible to save the game state as it was about a second or so backwards in time? I've tried entering a negative value for cpSpaceStep, but it doesn't seem to work.
Thanks!