fabiangreffrath / crispy-doom

Crispy Doom is a limit-removing enhanced-resolution Doom source port based on Chocolate Doom.
https://fabiangreffrath.github.io/crispy-homepage
GNU General Public License v2.0
807 stars 132 forks source link

Hexen: demos can desync when uncapped framerate is on #1147

Closed kitchen-ace closed 10 months ago

kitchen-ace commented 10 months ago

https://dsdarchive.com/files/demos/hexen/49452/se1f1236.zip

Recorded with "jHexen 0.99.6(se3)" so it's possible it's a malformed demo somehow. Nonetheless it works fine with uncapped framerate off, as well as in Chocolate and DSDA.

I get a desync at a different point depending on whether I have the framerate limit off or on. Even limiting it to 35 FPS still causes the desync. Haven't experienced any desyncs from demos recorded in other ports (though I have only tested a few). Nevermind, here's another one, recorded with DSDA-Doom: https://dsdarchive.com/files/demos/hexen/62317/hxAllf646.zip

fabiangreffrath commented 10 months ago

Out of the blue: could this be related to polyobj interpolation?

mikeday0 commented 10 months ago

Is this issue on 6.0 as well?

kitchen-ace commented 10 months ago

Out of the blue: could this be related to polyobj interpolation?

Seems unlikely to me, hxAllf646.lmp desyncs immediately after a teleport, the player fails to go far enough to reach the level exit.

Is this issue on 6.0 as well?

Yes, AFAICT it's been an issue with every version of Crispy Hexen that has uncapped framerates.

mikeday0 commented 10 months ago

Out of the blue: could this be related to polyobj interpolation?

You are right. For reasons I don't fully understand, I can fix the desync by disabling interpolation of rotating polyobjects.

fabiangreffrath commented 10 months ago

I think the interpolation code changes the objects' actual coordinates during each rendered tic, instead of waiting for the next calculated tic and merely lerping in between.

kitchen-ace commented 10 months ago

Great work @mikeday0 and good intuition @fabiangreffrath !