Look at it this way. Let's say someone records a demo in v1.7, and that demo will playback just fine in v1.7. This is because the demo stores the keys the player pressed while he was recording. When it plays back, it starts at the same point and then pretends that the player is playing it, using the keystrokes stored in the file. The engine is still computing all the physics, AI, sector actions, and other things that make the game run. None of that is stored in the demo.Hirogen2 wrote:Hm, I don't get it 100%. The demo format stayed pretty the same between (Doom2) 1.7 and 1.9 I guess, that is 35 actions per sec, and those also stayed the same, 0x1 for move and/or such. So the only thing which can desync and fux0r up a demo would be more execution in the main (renderer, AI, etc.) code. Is it? Then again I believe no since then, the whole game (non-demo) would also play faster/slower.
Now let's say that at a certain point in the demo, the player is riding a tall lift down and shooting at enemies. He manages to kill off two imps on his way down, and then kills the rest at the bottom, walks over their corpses to hit a switch, and goes on his merry way.
Now pretend that in v1.8, a bug was fixed that caused platforms to move 1 extra unit per second. Obviously an extremely minor change, but still a change. Now you play the demo back. The player reaches the lift, but it's going marginally slower. Because of this, he fails to kill one of the two imps on the way down. However, the demo has no way of adapting, as it doesn't know it was supposed to succeed in killing the imp, so it just keeps playing along like everything is okay. The player jumps off the lift a little early, and fires at some of the enemies on the ground (maybe it even kills one "on accident") but that pesky imp that should be dead is still alive. Regardless, the player didn't shoot after this point so he walks toward the switch. However, the imp gets in his way and delays him, doing some damage in the process. By the time the virtual controls recorded in the demo hit the use button, the player hasn't reached the switch. Then the player turns around and goes on his merry way, perhaps straight into a closed door that would have been opened had he hit the switch. The demo still doesn't know the door was supposed to be open, so the player just runs headlong into the wall and continues moving in seemingly random directions like a moron, trapped wherever he ended up, shooting at nothing, and being shot at by the imp he failed to kill.
That's why demos go out of synch. One seemingly innocent change can screw up every future action made by the player in the demo.