[ODE] Replays via recorded user input

Chris Campbell chris.campbell at l8tech.com
Wed Dec 18 22:17:01 2002


Thomas wrote:
> get the same results, you might be surprised since different 
> brands of CPU (particularly 
> in terms of intel vs Motorola, but also intel vs AMD, etc) 
> can result in different levels of 
> floating point accuracy, even for the same size of dReal, and 
....
> 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. I 


I am in the interesting position of having completed (apart from
a bugfix or two) a game using ODE which records replays and 
plays them, exactly as you say, calculating the entire physics 
sim over again.
I have been under the impression that it would work across 
Intel and AMD and I even said that on my webpage but have to 
admit I haven't actually tried it on an AMD cpu yet!!
If someone has an AMD and a bit of spare time, I'd be grateful
if they could check that these replays work. I am not intending 
it to support any other cpu types but if someone has another 
kind of cpu I guess it's as good a test as any to clear up this 
compatibility question (see below). I think if the floating point 
calculations are IEEE standard then replay like this should be 
viable. And at any rate, the problem would not be in ODE. 
I'm not using any compiler switches to change anything - debug
and release build replays are not compatible as was discussed
a little while ago on this list.
The main loop for this game is just as Thomas said, checking 
how many full timesteps have passed per rendered frame - I like 
this a lot. I have noticed one problem though: on a pc with no 
graphics acceleration and rendering framerate of about 3-8 fps, 
sometimes the replay would not work even when it was 
recorded on an identical intel... (!?) Another thing to note is 
that there is only one body, although I doubt more error would 
creep in if there was more.

AMD users>
(your mission should you choose to accept it)
Download game from
 http://www.zppz.com/games/zpracer/download/index.jsp 
start it up and watch the replay titled "zppz (gvalley 1:18:98)"
If the racer goes around the track sensibly and finishes in 
exactly 1:18:98 then it's ok. If after a few collisions with the 
ground it starts going crazy and appears to be driving around
randomly, it didn't work.

ChrisC