Random monster desyncs in online coop
Monsters seem to randomly desync in coop online, even when testing on a LAN and with sufficient rate/sv_maxrate variables set. For example, cyberdemons will sometimes show their firing sprites while moving around (a state desync, in this case).
Created attachment 199 [details]
Demonstrates a monster desync problem
Host this on a LAN and shoot the cyberdemon with the SSG. You should eventually see its state desync.
The attached WAD has a single large room and a single cyberdemon, showing that this sync problem occurs even in simple cases. Sync problems seem to be monster-pain-related.
Further testing with the attachment indicates that the rndindex of monsters is predicted very poorly by the client.
I have significantly improved monster sync in r3405. The primary problem was that monsters only got updates from the server every 10 tics, and this sporadic updating also affected monster states, so you ran into weird issues like fireballs firing without the firing animation.
I modified monsters to update every 7 tics (5 times a second), and also made sure that changes in state were transmitted immediately. The difference is immense, and coop is now very playable. There is a danger that packetloss might result in anomalies like 'dead' monsters that are still alive to the client, but that is a problem with how Odamex handles packetloss, and will fix itself with Sean's netcode bringup.
*** Bug 710 has been marked as a duplicate of this bug. ***
It's been 4 years since there has been any update on this bug. Has there been *any* changes on this front, or is odamex still as prone to monster desyncs as it was in r3405?
Not much has changed. Focus is more about getting SDL2 ready for release and fixing crashes. Hopefully when Dr. Sean finishes his netcode re-write there will be positive impact on monster sync as well.