Zandronum Chat on our Discord Server Get the latest version: 3.2
Source Code

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001442Zandronum[All Projects] Suggestionpublic2013-08-01 05:502014-05-05 22:23
ReporterWatermelon 
Assigned To 
PrioritynormalSeveritymajorReproducibilityhave not tried
StatusclosedResolutionduplicate 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0001442: Unlagged to tick based
DescriptionAs discussed elsewhere, with a ticbuffer being worked on, now would be the time to roll out unlagged based on ticks rather than the fickle ping, which works overall pretty good but is extremely unstable on wireless or devices prone to lag spikes and such. Tic based is a much stronger method of unlagged because you will be essentially responding with the tic that you fired in, rather than basing it off of ping.


First, the client will need a way of ensuring it gets the right gametic from the server. After that it will just send the gametic with each CLC_CLIENTUPDATE (I forget the header name) or w/e contains the ticcmd.

Second, the server will need to verify that it only gets one instruction per tic, or else it drops any/kicks them from the server. It must also ensure integrity (ex: if packet 800 is dropped, it should not get 800 when it's in the 1000's for example) and anything else that is exploitable.

Third, it should be linked ideally with the ticbuffer system.


In addition, maybe our cl_unlagged can turn into a bitmask rather than a bit?
Attached Files

- Relationships
related to 0001705closedWatermelon Gametic-based unlagged 

-  Notes
User avatar (0006872)
Watermelon (developer)
2013-08-01 05:53

Note: I do not propose removing the ping unlagged because it's stood the test of time, but this would be another option.
User avatar (0006895)
Dusk (developer)
2013-08-02 17:13

If the tic-based unlagged is overall better than the ping-based one then it should replace the ping-based one or at least be made default.
User avatar (0006929)
Torr Samaho (administrator)
2013-08-07 18:55

As I stated already via PM: The server should put as little trust as possible on anything it receives from a client. So it's very important that the checks you already mentioned are very thorough.

BTW: The clients already sent their gametic with CLC_CLIENTMOVE, so clients already sends enough information, but you still have to figure out how to sync gametic between client and server. I bet many other games already use such a kind of unlagged method. Did you already search for documentation of existing implementations?
User avatar (0006948)
Watermelon (developer)
2013-08-08 20:22
edited on: 2013-08-08 20:26

Well, the tracker just ate my 1000 word response, so that sucks.


Quick summary since I really don't feel like typing it all out again:

QUESTIONS:
- What happens if the server becomes bogged down? Does it try to do multiple gametics quickly? Or will the clients now desync completely because the server will be 10-20 tics behind in such a case? Care could be taken to write a safety net for the client around this.
- Do we need to send the clients tic? It seems like we could just have the client instead send back the servers last known gametic (or maybe 0xFFFFFFFF if unknown/no updates)
- Any reliable way of syncing them up? I spent a lot of time trying to think of a viable solution, but in the end it always came back to trusting the client, or making assumptions that nothing gets skewed or desynced. Any kind of desync is lethal in doom due to small bodies with fast speed

RESEARCH:
- Valve sends snapshots of the server time to the client, and the client responds with that
- ZDaemon claims to use the above
- Odamex trusts the client sending tic updates that it gets from the server
- Other netcode developers said that "worrying about someone hacking game ticks from the server with proper safety checking on the server is much more difficult for them and usually not worth it compared to making an aimbot or wallhack if your game is open source"

NOTES:
- Can put ticcmds in proper order since it will have the gametic. Of course right now it uses probably the ulClientTic field, but this could be replaced.
- Could we possibly detach from using the clients tics at all?
- Other engines claim that unlagged takes constant refinement to make it perfect, and does not come along in one go
- We need to consider putting a cap on our unlagged, but I can make a whole other ticket on why this should be considered


In addition, if we want to have the option to trust the client or not, then we could easily implement a sv_safeunlagged true/false which would switch to ping-based rather than tic based.

User avatar (0006976)
Watermelon (developer)
2013-08-10 15:29

Committed some basic stuff that is operational, but I plan on changing stuff up.
User avatar (0007220)
Watermelon (developer)
2013-09-18 17:14

When the ticbuffer is commited I will proceed on integrating this into it.
User avatar (0008705)
Watermelon (developer)
2014-05-05 22:23

Being handled in another ticket

Issue Community Support
This issue is already marked as resolved.
If you feel that is not the case, please reopen it and explain why.
Supporters: ZzZombo
Opponents: No one explicitly opposes this issue yet.

- Issue History
Date Modified Username Field Change
2013-08-01 05:50 Watermelon New Issue
2013-08-01 05:50 Watermelon Status new => assigned
2013-08-01 05:50 Watermelon Assigned To => Watermelon
2013-08-01 05:53 Watermelon Note Added: 0006872
2013-08-02 17:13 Dusk Note Added: 0006895
2013-08-07 18:55 Torr Samaho Note Added: 0006929
2013-08-08 20:22 Watermelon Note Added: 0006948
2013-08-08 20:23 Watermelon Note Edited: 0006948 View Revisions
2013-08-08 20:26 Watermelon Note Edited: 0006948 View Revisions
2013-08-10 15:29 Watermelon Note Added: 0006976
2013-08-28 21:19 Torr Samaho Target Version 1.2 =>
2013-09-18 17:14 Watermelon Note Added: 0007220
2014-05-05 22:22 Watermelon Assigned To Watermelon =>
2014-05-05 22:23 Watermelon Assigned To => Watermelon
2014-05-05 22:23 Watermelon Assigned To Watermelon =>
2014-05-05 22:23 Watermelon Status assigned => new
2014-05-05 22:23 Watermelon Relationship added related to 0001705
2014-05-05 22:23 Watermelon Note Added: 0008705
2014-05-05 22:23 Watermelon Status new => closed
2014-05-05 22:23 Watermelon Resolution open => duplicate






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2025 MantisBT Team
Powered by Mantis Bugtracker