as already stated, game2ipo is the script. there is also a project called bloded, but i know little abt it. find it all in the python section.
game2ipo works fine and is really easy to use. every object with a certain property name is tracked and the physics simulation is baked to it’s ipos. sou you start the engine, watch the simulation, and press esc when you want it to stop. then hit alt+a and watch the simulation in regular blender veiwports only one flaw - sometimes objects tend to flip suddenly, the author described this error more precisely - read it on his website.