Not logged inOpenClonk Forum
Up Topic Development / Developer's Corner / 0001109: Sync loss on runtime join
- - By Clonkonaut [de] Date 2016-01-02 23:24
Could someone with the necessary expertise have a look at this patch: http://bugs.openclonk.org/view.php?id=1109
Reply
Parent - By Günther [de] Date 2016-01-04 05:13
I don't know that area of the code, but the patch essentially avoids using the per-client NextControl facility if the network mode isn't async. If I'm not mistaken, async means that the host decides in which tick a control sent by a client gets executed, instead of waiting for all controls of every client before executing a tick. Assuming the patch does fix something: Apparently the old code was written with the assumption that getNextControl and SetNextControl would do appropriate things even in non-async mode, but was mistaken. Which makes me wonder whether there are other places with this problem, and whether getNextControl and SetNextControl shouldn't be fixed instead. And whether the patched code works with control rates of less than once every tick.

I'd comment in the bugtracker, but it won't let me log in. (I suspect mantis discriminates against Umlauts.)
Reply
Parent - By PeterW [gb] Date 2016-01-09 00:49 Edited 2016-01-09 01:01
As far as I'm concerned, the right fix would be to set the next control tick correctly in the first place. See for example here:

https://git.openclonk.org/openclonk.git/blob/HEAD:/src/network/C4GameControlNetwork.cpp#l315

For runtime join, this should probably be "::Control.ControlTick+1", because the client will only contribute to the next tick? Must be careful though, because this might be inconsistent with the client's view. After all, it clearly produced control for this tick - but maybe didn't execute it itself, leading to the desync? Not sure. Plus if I remember correctly just this change would not work with a "normal" game start.
Up Topic Development / Developer's Corner / 0001109: Sync loss on runtime join

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill