Sync Errors
Moderator: Moderators
-
- Posts: 37
- Joined: 15 Mar 2006, 00:40
Sync Errors
Is there any particular reason that we see sync errors when one player builds 500 farks etc.. ?
I'm curious what exactly causes sync problems. Usually the game will send delayed sync packets and everything is fine, but in some cases the sync problem is permimant for the duration of the game.
I'm curious what exactly causes sync problems. Usually the game will send delayed sync packets and everything is fine, but in some cases the sync problem is permimant for the duration of the game.
A resync option would meen that the host send his current status to all players.
but hcuch a current status would involve an enormouse amount of data, since Spring is build on just the transfer of command and every player simulates a game. (how a relay works)
A resync package would include all pos, status, orders of all units and heightmaps.
but hcuch a current status would involve an enormouse amount of data, since Spring is build on just the transfer of command and every player simulates a game. (how a relay works)
A resync package would include all pos, status, orders of all units and heightmaps.
-
- Posts: 47
- Joined: 28 Dec 2005, 03:20
If the sync error is cause by a differ of mods or maps, this would only temporary solve it. and the sync errors well be back very quickly.AF wrote:That depends upon you trusting that the one that brought you all out of sync isnt the host....
If there is an other reason, why should it matter tho who's game you resync?
-
- Posts: 37
- Joined: 15 Mar 2006, 00:40
Couldn't you structure the 'synced' data in such a way that it periodically takes a checksum of certain parts of the game state? This is slightly different than what goes on at the moment.
That way, clients would exchange checksums to determine who caused the game to desync. Then only that particular part of the game state would be resynced by the host.
Assuming a generic resync system would also resync the heightmap, this would save alot of bandwidth.
That way, clients would exchange checksums to determine who caused the game to desync. Then only that particular part of the game state would be resynced by the host.
Assuming a generic resync system would also resync the heightmap, this would save alot of bandwidth.
-
- Posts: 436
- Joined: 26 Aug 2004, 08:11
I couldn't agree more, incidenta. What I'd like to do is analyze the code more, and see how the checksum is computed. I **think** it has a section of memory that contains synced data, and the checksum is computed on that entire memory block, but I haven't investigated. What'd be ideal is to have the classes that contain synced data implement a "GetHash" function or something of the sort as well as a "Resync" method that can take serialized data and resync the data inside.
- Dr.InfernO
- Posts: 223
- Joined: 18 Nov 2005, 13:55
One thing that can cause a desync is cheating. Cheating is very easy for a programmer. The only protection is that the game gos out of sync if anyone cheats. But if the host was cheating and everyone synced to the host, nothing could stop the host from cheating.Zenka wrote:If there is an other reason, why should it matter tho who's game you resync?
I.e: If the host gives himself a Krogoth, that Krogoth will only exist on his computer, and the game would go out of sync. If re-sync is enabled, the Krogoth would be re-synced to all of the computers, and the host would have an extra Krogoth.
I think that Tobi was working on a voting system for a while, but now he's concentrating on preventing sync errors, espcally between Linux and Windows. I don't remember for sure.
-
- Posts: 37
- Joined: 15 Mar 2006, 00:40
You could at least stem the tide of most cheats by doing a checksum on the executable itself in realtime. Open a handle to the executable and feed it into an md5 hash function.
The tricky part would be identifying whether or not the checksum was calculated on the executable being run, instead of one sitting in another folder.
Since this is an opensource game, it's pretty much impossible to stop the majority of 'all-seeing-eye' modifications.
The tricky part would be identifying whether or not the checksum was calculated on the executable being run, instead of one sitting in another folder.
Since this is an opensource game, it's pretty much impossible to stop the majority of 'all-seeing-eye' modifications.
-
- Posts: 37
- Joined: 15 Mar 2006, 00:40
Submitting memory for peer-review might work better. You could scan specific functions with a runtime disassembler for obvious breaks in code.Tobi wrote:as you already say, commenting out a few lines of code and recompiling would break your measures...
anyone can always spoof the md5sum message after all...
Ex (memcmp stuff is from memory, not sure about parameters offhand

To incorperate this into the game, sync the pMemory buffer accross hosts and allow the existing system to deal with it. Also, you could have the game check different functions upon request of any client connected to a game (with spam protections; i.e. 1 request every 30 seconds, maximum of 128 bytes w/ checksum).
Code: Select all
void *p = &myFunc;
char *pMemory = new char [32];
for(int i=0; i<32; p++)
{
pMemory[i] = (char)(*p);
i++;
}
//Somewhere else in code..
send(socket, pMemory);
//Somewhere else in code..
recv(socket, pTheirMemory);
if(!memcmp(pMemory, pTheirMemory))
{
//Sync error!
throw(new SyncError("Exeecutable Data Mismatch!"));
}
The point is to deny the middle 50% of cheaters who can modify code and recompile, but are otherwise incapable of doing anything really advanced.
The top 10% would obviously be able to circumvent this given time.
It's sill not too hard... you hack the exe to output the data which is send over the net to file, then you hack it to read that data and send it over the net instead of grabbing your actual code. Then you can modify the protected code as much as you want without anyone noticing.
ie. it will ALWAYS be possible to spoof network messages, no matter how obfuscated you make the checking code. In general, circumventing the security measures probably takes less time then implementing them...
Only thing which may work is something with public/private keys and lists of trusted users...
ie. it will ALWAYS be possible to spoof network messages, no matter how obfuscated you make the checking code. In general, circumventing the security measures probably takes less time then implementing them...
Only thing which may work is something with public/private keys and lists of trusted users...
-
- Posts: 436
- Joined: 26 Aug 2004, 08:11
Anyone could easily intercept this by figuring out what each function is supposed to hash to, then intercepting the message when its received and sending the correct number. Building a 100% effective anticheat measure is impossible. I mean, look at what happened with Quake 3 and punkbuster thereafter?
-
- Posts: 37
- Joined: 15 Mar 2006, 00:40
This isn't intended to be 100% foolproof. By making changes break with every update, it will make it inconvenient to cheat.jouninkomiko wrote:Anyone could easily intercept this by figuring out what each function is supposed to hash to, then intercepting the message when its received and sending the correct number. Building a 100% effective anticheat measure is impossible. I mean, look at what happened with Quake 3 and punkbuster thereafter?
Also, randomizing which sections are scanned and how much is scanned would mean that the attacker would require access to the original executable, and knowledge of how to pull certain signatures from its functions.
By making it impossible to hash every concievable combination of data, which by the way is version dependant in many cases, you require a certain skillset to 'cheat', thus limiting the number of people who could successfully pull it off without being detected.[/code]