|Anonymous | Login | Signup for a new account||2018-03-24 00:37 UTC|
|My View | View Issues | Change Log | Roadmap | Zandronum Issue Support Ranking | Rules | My Account|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0002859||Zandronum||[All Projects] Bug||public||2016-10-06 05:39||2017-11-10 16:31|
|Target Version||3.1||Fixed in Version|
|Summary||0002859: Gametic-based unlagged seemingly goes out of sync often compared to ping-based unlagged|
|Description||I did some tests earlier and did some more tests now, and it seems that the gametic-based unlagged causes the client to gradually desync the positions of the opponents until the positions "snap back" in place. In some cases, the positions are seemingly almost permanently desynced until the opponents stop moving. This happens without any ping emulation. It's worse after changemap map changes. When changing to ping-based unlagged, none of this happens.|
Is this a bug, or some strange side-effect of gametic-based unlagged?
|Steps To Reproduce||1. zandronum -host -iwad doom2.wad -file unlaggedactor.wad +sv_unlagged_debugactors 1 +sv_nomonsters 1 +map map01|
2. zandronum -iwad doom2.wad -file unlaggedactor.wad -connect localhost
3. zandronum -iwad doom2.wad -file unlaggedactor.wad -connect localhost
4. Join the game with client A, making sure that it uses gametic-based unlagged.
5. Join the game with client B.
6. "changemap map01" in the server console.
7. Move around with client B soon as the map has loaded. Notice the apparent desync.
8. Set unlagged to ping-based on client A and repeat step 6 and 7 and notice how it doesn't desync.
|Additional Information||I can always reproduce the gametic desync after changemap map changes. Let me know if you want/need a demo.|
|Attached Files|| unlaggedactor.wad [^] (1,244 bytes) 2016-10-06 05:39|
GameticVSPing.png [^] (97,642 bytes) 2016-10-06 05:42
unlagged_debug.wad [^] (7,309 bytes) 2017-10-27 21:36
edited on: 2016-10-08 10:39
You can also reproduce this by simply joining the game with the observing client, no need for a changemap map change.
I did some more tests and can at the moment conclude with that at any given ping, the red debug actor is further behind the player when using gametic-based unlagged.
edited on: 2016-10-12 05:39
If this will not be looked into and changed/fixed before 3.0 is released (which I assume is too late now), then I insist that we temporarily reintroduce ping-based unlagged as an option for users. A proper gametic-based unlagged would perhaps be ideal, but in its current state it's simply not good enough to fully replace the tried and true ping-based one. You're going to have to fix the desyncs first before fully replacing it. The fact that it desyncs with a local connection suggests that it's fundamentally bugged.
Won't the over-reconciliation technically allow you to hit other players in your own client's past?
I did some more tests and can confirm that the gametic-based unlagged also desyncs a little consistently every 24-25 seconds. In addition to this, I now just discovered that it also desyncs whenever you respawn. And not too surprisingly, it also seems to desync after map resets. It also seems to desync with cl_ticsperupdate 2/3, causing the client to seemingly over-reconcile the other players permanently, though I'm not sure whether this is a bug or some visual side-effect. In any case, the debug actor is synced perfectly with the player position when using ping-based unlagged, whereas it's always flickering behind the player position when using gametic-based unlagged.
To summarize my findings so far:
* Desyncs after changemap map changes.
* Desyncs when you join the game.
* Desyncs a little consistently every 24-25 seconds.
* Desyncs when respawning.
* Desyncs after map resets.
* Seems to permanently over-reconcile other players with cl_ticsperupdate 2/3.
* For any given ping, even with ping spikes, the position of the debug actor is further behind the player compared to its position when using ping-based unlagged.
I noticed that disabling the tic buffer seems to improve things. It then stops desyncing after changemap map changes, map resets and when respawning. Though this makes me wonder if this whole issue is nothing but a visual side-effect of the tic buffer and a misunderstanding on my part. Let me know if this is the case.
The ping-based unlagged also seems to undergo a minor readjustment every 25-30 seconds as well, provided that the client has some ping. It doesn't seem to do it with a local connection like the gametic-based one does.
However, after some extensive tests with actually firing at a moving client, it seems to me that the hitbox is actually more often than not further ahead with the ping-based unlagged, as the player seems to have a bigger "dead-zone" behind where no pellets hit, and a bigger "hit-zone" at the front where pellets hit. This would mean that the ping-based unlagged is the more inaccurate one? Interesting.
So in conclusion, the gametic-based unlagged seems to actually be more accurate, but it still seemingly has some quirks left, particularly with how it starts to "desync" when having a local connection to the server.
Here is the original thread where this was discussed. For some reason, all of the links to bitbucket are gone, but hopefully it should point you in the right direction to the source of when the patch made it into Zandronum:
I find your described behavior incredibly perplexing. At least when I was working on the patch, there was no big redesign of unlagged. Instead, it simply tried to measure the difference in tics between the client and the server more accurately, by simply comparing two tic counts instead of relying on ping, which is a much more mercurial and out-of-date value, averaged over several samples. To wit, the original code that picked the gametic to go back to:
> int unlaggedGametic = ( gametic - ( player->ulPing * TICRATE / 1000 ) );
compared with what happens now:
> int unlaggedGametic = pClient->lLastServerGametic + 1;
Looking around in the source, you can see that in sv_main.cpp, lLastServerGametic is read directly off the wire from the client's movement command. In cl_main.cpp, you can see that CLIENT_SetLatestServerGametic() is updated when connecting, and also when the client gets MoveLocalPlayer commands.
However, if you check post 8277 on that ticket I linked, you will notice that I did notice a discrepancy at higher pings between the two methods and couldn't explain all of it. Most importantly, I could not figure out if the discrepancy between the two was because gametic was more accurate, or because I was making a bad assumption somewhere.
This is where my involvement with the patch ended and Water took over, and it didn't look like anybody followed up on investigating this discrepancy - Water assured the ticket that he had tested it, and I suppose players considered it better than the status quo and wanted it in 2.0.
Hopefully some of this rambling is helpful to you. And yeah, I definitely think that Torr should get involved to make sure that our assumptions are all sound.
|Recovered the full commit link.https://bitbucket.org/Torr_Samaho/zandronum-old/commits/8e43651ce72ae4b0a66ebc0e1c011b04c883ac74 [^]|
edited on: 2016-10-14 13:52
Thanks for the response, AlexMax. Hopefully we can sort this issue out.
0002712 confirms some sort of desync caused by the gametic-unlagged working with the tic buffer.
However, even with the tic buffer off it still desyncs a lot if cl_ticsperudate is 2/3.
|noob question: how do I change between tic based and ping based unlag? I can't seem to find the variable/command. Also just so I completely understand, what exactly does unlaggedactor.wad do/show?|
Torr Samaho (administrator)
As unknownna suggested, I restored the option to use ping based unlagged for now.
Quote from JKist3
The CVAR to toggle this is cl_ping_unlagged.
Quote from JKist3
For every client, the server spawns debug actors that show where the other players are moved for determining hits of attacks from that client with unlagged. Of course, you are seeing the unlagged information "from the past" with this, but it should give you an idea by how much players are moved for determining hits.
edited on: 2017-02-13 18:01
Yeah, it's definitely best to keep in mind the debug actors are going to lag behind due to latency. Some people back when unlagged was being tested didn't realize this.
Seems a lot of bugs were introduced by the tic buffer, because before it became a thing, Gametic unlagged was pretty much perfect.
By the way, shouldn't this be on the roadmap?
Torr Samaho (administrator)
Quote from StrikerMan780
The way unlagged is perceived seems to be very different from player to player. Although, the memory of how well / bad unlagged worked in the past compared to now does not seem to be very objective. In any case, the debug builds allow to turn off the tic buffer with "sv_useticbuffer 0". So, for a fair comparison to check whether something is caused by the tic buffer, you should compare the situation with the same 3.0 build using "sv_useticbuffer 0" and "sv_useticbuffer 1".
Quote from StrikerMan780
Yes, it should. Since it's not a 3.0 regression, I'll add 3.1 as target.
edited on: 2017-02-14 23:30
I dunno, Ping unlagged pretty often missed direct shots in instagib where Gametic didn't for the majority of players in testing. (Ping also hit when it should have missed, like shots too far ahead of target's direction of movement) I'd say that's fairly objective.
edited on: 2017-09-12 11:49
unknownna: can you test this again on zan 3.0? I just did and was unable to get gametic unlagged to desync at all on a local server.
I can reproduce this in 3.0.
On top of that, switching cl_ping_unlagged on and off clearly shows the desync only happens with gametic unlagged.
|How are you testing this Leonard? are you using a local server? I will try to reproduce your steps if you tell me how you are doing it.|
edited on: 2017-11-10 16:31
This was a nightmare to debug.
There were actually multiple issues getting in the way of this, both from the ticbuffer and unlagged.
After finally fixing everything, I will now create separate tickets and make pull requests for them one by one to keep things simple.
I will address this ticket once enough has been fixed and we can clearly see what happens.
It's worth noting that while debugging/testing each issue I used this commit which gave me very useful information and also a test wad that goes with it.
In the test wad there is a very useful map that allows easy stress-testing of unlagged.
This map along with the commit will allow us to gather empirical evidence of what works properly or not.
I will refer to this note in the coming tickets whenever it's needed to test the issues.
EDIT: Changed the commit's link (it's in a closed branch now so it doesn't show up but you should still be able to pull it directly if you want).
|Only registered users can voice their support. Click here to register, or here to log in.|
|Supporters:||unknownna FascistCat Combinebobnt|
|Opponents:||No one explicitly opposes this issue yet.|
|2016-10-06 05:39||unknownna||New Issue|
|2016-10-06 05:39||unknownna||File Added: unlaggedactor.wad|
|2016-10-06 05:42||unknownna||File Added: GameticVSPing.png|
|2016-10-06 05:48||unknownna||Steps to Reproduce Updated||View Revisions|
|2016-10-08 04:31||unknownna||Note Added: 0015790|
|2016-10-08 04:31||unknownna||Priority||high => urgent|
|2016-10-08 10:39||unknownna||Note Edited: 0015790||View Revisions|
|2016-10-11 20:12||unknownna||Note Added: 0015907|
|2016-10-11 20:17||unknownna||Note Edited: 0015907||View Revisions|
|2016-10-11 20:26||unknownna||Note Edited: 0015907||View Revisions|
|2016-10-11 20:53||unknownna||Note Edited: 0015907||View Revisions|
|2016-10-11 21:02||unknownna||Note Edited: 0015907||View Revisions|
|2016-10-12 05:39||unknownna||Note Edited: 0015907||View Revisions|
|2016-10-12 06:17||AlexMax||Note Added: 0015915|
|2016-10-12 16:27||Ru5tK1ng||Note Added: 0015924|
|2016-10-14 13:29||unknownna||Relationship added||related to 0002712|
|2016-10-14 13:47||unknownna||Note Added: 0015988|
|2016-10-14 13:52||unknownna||Note Edited: 0015988||View Revisions|
|2016-10-14 13:52||unknownna||Note Edited: 0015988||View Revisions|
|2016-10-27 22:18||JKist3||Note Added: 0016097|
|2016-11-06 11:31||Torr Samaho||Note Added: 0016148|
|2017-02-11 19:06||StrikerMan780||Note Added: 0016837|
|2017-02-13 18:01||StrikerMan780||Note Edited: 0016837||View Revisions|
|2017-02-13 18:59||Torr Samaho||Note Added: 0016861|
|2017-02-13 18:59||Torr Samaho||Target Version||=> 3.1|
|2017-02-14 23:29||StrikerMan780||Note Added: 0016865|
|2017-02-14 23:30||StrikerMan780||Note Edited: 0016865||View Revisions|
|2017-09-12 11:48||JKist3||Note Added: 0018289|
|2017-09-12 11:49||JKist3||Note Edited: 0018289||View Revisions|
|2017-10-22 13:58||Leonard||Note Added: 0018586|
|2017-10-22 13:58||Leonard||Status||new => confirmed|
|2017-10-22 20:05||JKist3||Note Added: 0018597|
|2017-10-23 14:50||Leonard||Assigned To||=> Leonard|
|2017-10-23 14:50||Leonard||Status||confirmed => assigned|
|2017-10-27 21:33||Leonard||Note Added: 0018627|
|2017-10-27 21:36||Leonard||File Added: unlagged_debug.wad|
|2017-10-27 21:39||Leonard||Note Edited: 0018627||View Revisions|
|2017-11-08 00:59||Leonard||Relationship added||child of 0003334|
|2017-11-08 00:59||Leonard||Relationship added||child of 0003317|
|2017-11-08 00:59||Leonard||Relationship added||related to 0003314|
|2017-11-08 01:00||Leonard||Relationship replaced||child of 0003314|
|2017-11-08 01:01||Leonard||Relationship added||child of 0003316|
|2017-11-10 16:29||Leonard||Note Edited: 0018627||View Revisions|
|2017-11-10 16:31||Leonard||Note Edited: 0018627||View Revisions|
Questions or other issues? Contact Us.
|Copyright © 2000 - 2018 MantisBT Team|