Skip to content

Implement debug to detect game state mismatch #289

@xezon

Description

@xezon

Implement debug to detect game state mismatch.

Strategy 1

We can aggressively log out evolution of hashes every (logic) frame to see how they evolve, then take the log from 2 clients that mismatched and compare them to see where that mismatched hash came from. This potentially would also work for Replays, aka get 2 replays that had mismatched, run one after another, then compare the logs.

Reference on mismatch detection strategy:
https://springrts.com/wiki/Debugging_sync_errors

Additional note

Quote from Kris Morness via "John Wick":

It would be easy to disable the CRC mismatch. The highlighted code could be skipped by hooking up a new commandline arg like -ignoreDesyncs

If your playing with friends, then that would probably be fine, but you may still encounter situations where the game diverges and multiple people win. The longer a desynced game goes, the bigger the convergence.

I don't have the code compiled or anything but now with the open source, there are likely modders already planning to patch the exe, this is a very simple change!

Metadata

Metadata

Labels

CriticalSeverity: Minor < Major < Critical < BlockerEnhancementIs new feature or requestNetworkAnything related to network, servers

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions