MantisBT - Zandronum
View Issue Details
0002298Zandronum[All Projects] Bugpublic2015-06-09 02:182019-01-01 20:09
unknownna 
Leonard 
highminoralways
resolvedfixed 
2.0 
3.13.1 
0002298: Ancient +jump misprediction that harks back to early Skulltag days
If you have a high ping and hold +jump and then for instance bump into an actor that can't be predicted properly, e.g. a moving monster, the jump pattern will in most cases permanently desync until you release +jump. This causes all sorts of unnecessary jitter to appear. I also notice this behavior when jumping while standing on lowering/raising floors, e.g. when standing on lifts.

It's a bit more difficult to reproduce the issue with players, but it's possible.
1. zandronum -file jumping_01.wad -host
2. Connect a client to the server with an emulated ping of 603.
3. "addbot" in the server console 6 times.
4. Join the game.
5. Run into the bots while holding +jump and jumping from bridge things to real floors and vice versa.
6. Press +use to teleport to the next room.
7. Run into the zombiemen while holding +jump.
8. Press +use to teleport to the next room.
9. Hold +jump while pressing +use to activate the platform.
10. Press +use on the normal floor to teleport back to the starting room.
Once the jumping pattern has desynced, ZDaemon seems to automatically re-sync itself compared to Zandronum. It's not really a major issue in the sense that it's devastating, but it's noticeable when playing competitively and/or when getting a lag spike.
No tags attached.
related to 0000106feedback Leonard Client mispredicts its z position in swimmable water online 
? jumping_01.wad (9,455) 2015-06-09 02:18
https://zandronum.com/tracker/file_download.php?file_id=1538&type=bug
? jumping_02.wad (17,267) 2017-10-22 02:16
https://zandronum.com/tracker/file_download.php?file_id=2221&type=bug
? jumpTest.cld (24,967) 2017-10-29 11:04
https://zandronum.com/tracker/file_download.php?file_id=2227&type=bug
Issue History
2015-06-09 02:18unknownnaNew Issue
2015-06-09 02:18unknownnaFile Added: jumping_01.wad
2015-06-09 02:18unknownnaStatusnew => confirmed
2015-06-17 03:55unknownnaRelationship addedrelated to 0000106
2017-10-22 02:16LeonardFile Added: jumping_02.wad
2017-10-22 02:18LeonardNote Added: 0018584
2017-10-22 02:18LeonardAssigned To => Leonard
2017-10-22 02:18LeonardStatusconfirmed => needs review
2017-10-22 02:18LeonardTarget Version => 3.1
2017-10-28 11:08Torr SamahoNote Added: 0018632
2017-10-28 11:09Torr SamahoStatusneeds review => assigned
2017-10-28 14:37LeonardNote Added: 0018633
2017-10-28 14:37LeonardStatusassigned => needs review
2017-10-29 11:04Torr SamahoFile Added: jumpTest.cld
2017-10-29 11:05Torr SamahoNote Added: 0018642
2017-10-29 11:06Torr SamahoStatusneeds review => assigned
2017-10-29 11:07Torr SamahoNote Edited: 0018642bug_revision_view_page.php?bugnote_id=18642#r11212
2017-10-29 16:02LeonardNote Added: 0018648
2017-10-29 16:02LeonardStatusassigned => needs review
2017-10-31 19:06Torr SamahoNote Added: 0018690
2017-10-31 19:30Torr SamahoNote Added: 0018692
2017-10-31 19:30Torr SamahoStatusneeds review => needs testing
2017-11-01 00:14LeonardNote Added: 0018693
2018-05-08 21:26StrikerMan780Note Added: 0019230
2018-05-10 02:52StrikerMan780Note Added: 0019234
2018-05-10 02:53StrikerMan780Note Edited: 0019234bug_revision_view_page.php?bugnote_id=19234#r11538
2018-05-10 12:50LeonardNote Added: 0019238
2018-05-11 19:55StrikerMan780Note Added: 0019240
2018-05-13 12:44LeonardStatusneeds testing => resolved
2018-05-13 12:44LeonardResolutionopen => fixed
2018-05-13 12:44LeonardFixed in Version => 3.1

Notes
(0018584)
Leonard   
2017-10-22 02:18   
PR.

I also attached a new testing wad that allows to reproduce the issue much faster: simply go in and out of the center sector once while holding +jump to get the desync (with 600 ping as reported).
(0018632)
Torr Samaho   
2017-10-28 11:08   
Please see the comment I just left in the pull request.
(0018633)
Leonard   
2017-10-28 14:37   
I replied.
(0018642)
Torr Samaho   
2017-10-29 11:05   
(edited on: 2017-10-29 11:07)
Thanks! The code looks good now, but with your example wad and an emulated ping of 300, I still easily get prediction errors. I attached a demo to illustrate the effect. Perhaps something went wrong when I applied your patch locally. Does this work for you with a ping of 300?

(0018648)
Leonard   
2017-10-29 16:02   
The patch works for me.
After watching your demo, I think you misunderstand what should be fixed here:
the misprediction in itself cannot be fixed (you are jumping on bridges which are solid on the server but not on the client), what this fixes is the permanent jumptics desync that would result from such mispredictions.
You may notice that simply running without jumping into the bridges will make the client jitter as well: the position cannot be predicted either due to the nature of the misprediction.
Quote from unknownna
for instance bump into an actor that can't be predicted properly, e.g. a moving monster, the jump pattern will in most cases permanently desync until you release +jump.

This is what the patch should fix.
If you try without the patch and with 600 ping, the jumping pattern will never resync unless you let go of +jump.
With the patch however, the jumping pattern resyncs itself almost immediatly (just like the position always did).
Quote from unknownna
Once the jumping pattern has desynced, ZDaemon seems to automatically re-sync itself compared to Zandronum.

In real conditions, this may happen when packets are dropped or with ping spikes, we just use 600 ping here because that means the client is teleported back high enough so as to not re-hit the ground and therefore change its jumptics every time.
(0018690)
Torr Samaho   
2017-10-31 19:06   
Oh, wait. You are saying that your example wad jumping_02.wad intentionally desyncs client and server, so that you are supposed to get mispredictions even with the fix? That's quite unlike the usual example wads here. A small hint that the wad contains an unfixable sync issue that should be disregarded would have been helpful ;). I was apparently looking for the wrong thing.
(0018692)
Torr Samaho   
2017-10-31 19:30   
I added your patch.
(0018693)
Leonard   
2017-11-01 00:14   
You're right, I didn't realise my first note implied the issue was the misprediction itself, my bad.
(0019230)
StrikerMan780   
2018-05-08 21:26   
Can someone upload a zandronum build with the interpolation bug fixed? The jitter makes this one harder for me to tell if there's something wrong or not.
(0019234)
StrikerMan780   
2018-05-10 02:52   
(edited on: 2018-05-10 02:53)
Ok, with a high simulated ping of 600, I can trigger some pretty nasty mispredictions by bumping into monsters in jumping_01.wad, but it doesn't stay screwed up, it corrects itself rather quickly. I guess this is normal?

(0019238)
Leonard   
2018-05-10 12:50   
If you're talking about the jumping pattern then yes, this is what the fix is supposed to do.
(0019240)
StrikerMan780   
2018-05-11 19:55   
Yes, I am. So I guess this can be marked as fixed then.