[ODE] Randomness in ODE
Martin C. Martin
martin at metahuman.org
Wed Dec 18 08:37:01 2002
Thomas Harte wrote:
>
> Because of my belief as per the above, I do not think that
> simply replaying the user supplied input to the game engine will work - especially not if a
> saved replay is sent, e.g. from someone using a Windows PC to someone using a Mac.
Very true.
> I have therefore decided to take the approach of storing orientation and position of
> bodies at a certain (high-ish) rate, and interpolating between those. Was this a bad
> decision?
No, this is pretty much what you need to do. It's also what Doom & Quake
do with "demo recording." Among other things, it allows recamming,
editing and machinima, i.e. making (non-interactive) movies with the Quake
engine:
http://www.machinma.com
> Would I notice massive jumps if I stored the input state, and then the state of
> every body just, say, once every second, and pushed the input into the game engine
> but forced the bodies to jump to the stored states at the correct intervals?
I think what Quake does is store at much higher frame rate (say, 10 times
a second), then do a linear interpolation between them. This is an issue
with trying to make a "cut" in machinima, since you want the camera to
move discontinuously, but it will spend a frame or two at an intermediate
location. Anyway, if there's anything at all chaotic in your world, I'd
expect you'd get some weird jerky motion if you did the "physics &
resetting" method you proposed. e.g. things might bounce in a different
direction. I'd vote for the "no physics on replay," but that's just me.
- Martin