Page 1 of 1

physics simulation Back-In-Time

Posted: Thu Jan 05, 2017 4:57 am
by yanbo2u
It will be fxxxing awesome if the physics engine can simulate the world both forward and backward in time. when you flip the switch back and forth, every movement in the world behaves as if it is in a video tape. e.g. an apple falls from a tree and hits the man in the head, or the apple lifts off from the poor man's head and ascends to the tree.

It is possible?

Re: physics simulation Back-In-Time

Posted: Thu Jan 05, 2017 5:14 am
by Norbo
Unfortunately, while the laws of classical mechanics are time reversible, BEPUphysics isn't. Supporting that kind of thing without any tricks would require a very different kind of engine.

The usual solution to this for games is to record states for playback. For example, if the player is able to rewind time up to 5 seconds into the past, store a ring buffer of frame states and let them scrub through it. Or, for full game replays, just store the whole history (probably with various forms of trickiness and compression).