Replays in racing sims
and how they should be saved

Just save the initial state and then save the drivers input together with synchronization information. Then whenever the replay is played, just resimulate but instead of collecting data from the joystick port, get it from the replay file. This needs a deterministic simulator, but why not? just save the state of the randomizer too. This is how it was done in Geoff Crammond's Grand Prix 2 and I have approximately viewed around 1000 hotlaps from drivers all over the world without any problems. 

This approach has two very big advantages. It results in very small replay files (2 minutes in 50kb) and it gets so much harder to cheat. Since the state of the simulator is stored in the replay file, the replay file has all kinds of information, such as bhp, grip, track temp, tyre type, tyre temp, car setup, etc... All this info is needed to simulate the replay correctly and I think this info should be viewable in the simulator, cause sooner or later their will come editors which change these data and it would be really nice to see the changes in some window.

Apparently some racing sims do the physics, AI, graphics and joystick reading in different threads or processes. In order to resimulate these I guess some kind of timestamp is needed for the joystick reads, so the joystick data from the replay file is used in the correct cycle in the physics thread/process.

 

This page is only visited  times.