How to reproduce multi-player game de-syncs

How to reproduce multi-player game de-syncs

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
xyz
Posts: 152
Joined: 29 Nov 2008, 16:06

How to reproduce multi-player game de-syncs

Post by xyz »

Hi,
A few days ago, while playing with a friend of mine, we found a reliable way to reproduce the de-syncs. It happened 3 out of 3 times.

Setup:
Me (HOSTING) Canada: AMD 64 X2 5000+, 2Gb ram, GeForce 9800GT (512M), Win XP sp3, ADSL 8Mbps Down, 256 kbps Upload.

Friend (Client) Romania: dell 1520 laptop ( Intel Core 2 Duo 2000, 4Gb ram, nVidia GeForce 8600M GT (256), with Win XP sp3.

Game: 2vs2 BA game on the map DeltaSiege Island 8 Way (http://spring.jobjol.nl/show_file.php?id=1952). We ware 2 players and 2 KAI's (you need KAI as it does not build any water).

Steps to reproduce:
At the beginning of the game we only built 4 mex on the ground and then moved completely in the water. After 10, 15 minutes of play (you can speed up the game if you want, just give time to the AI to build a significant number of units) then just build an hydroplane complex, and a radar plane, and send the radar over the middle of the island. And there you go a gigantic de-sync, in one game the frame difference was up to 10.000. If I pressed the pause button he's game was still running for 5 min, and then we gave up.

Thanks.
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: How to reproduce multi-player game de-syncs

Post by Kloot »

You may be confusing the "no sync response" messages for actual sync errors. Upload an infolog of one of these games (from both parties), right now this
And there you go a gigantic de-sync, in one game the frame difference was up to 10.000. If I pressed the pause button he's game was still running for 5 min
looks like a symptom of your setting the game speed too high.
xyz
Posts: 152
Joined: 29 Nov 2008, 16:06

Re: How to reproduce multi-player game de-syncs

Post by xyz »

Kloot wrote:looks like a symptom of your setting the game speed too high.
No, the game-speed was just for speeding up the reproducing steps, when we played the game we played it at normal speed. As for the infolog, it will have to wait, I did not saved it,so we will have to reproduce the bug again, sorry.
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: How to reproduce multi-player game de-syncs

Post by Auswaschbar »

When your network connection is really bad, something like this can happen.

I can reproduce that with setting something like 400 ms ping and 10% packet loss.
xyz
Posts: 152
Joined: 29 Nov 2008, 16:06

Re: How to reproduce multi-player game de-syncs

Post by xyz »

Auswaschbar wrote:When your network connection is really bad, something like this can happen.

I can reproduce that with setting something like 400 ms ping and 10% packet loss.
The de-sync never happened between us, except with using those steps. We have never experienced any lag, in any of our games. And we also use Skype to talk while playing, and there ware no problems with that either.
YokoZar
Posts: 883
Joined: 15 Jul 2007, 22:02

Re: How to reproduce multi-player game de-syncs

Post by YokoZar »

xyz wrote: And we also use Skype to talk while playing, and there ware no problems with that either.
As I understand it Skype can handle bad network conditions surprisingly well.
xyz
Posts: 152
Joined: 29 Nov 2008, 16:06

Re: How to reproduce multi-player game de-syncs

Post by xyz »

YokoZar wrote:
xyz wrote: And we also use Skype to talk while playing, and there ware no problems with that either.
As I understand it Skype can handle bad network conditions surprisingly well.
True, but what bothers me is the fact that we never got any de-sync, until we played it as the steps described above, and in that day we also played a chicken defence game, and no problems there.
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: How to reproduce multi-player game de-syncs

Post by Auswaschbar »

xyz wrote:
YokoZar wrote:
xyz wrote: And we also use Skype to talk while playing, and there ware no problems with that either.
As I understand it Skype can handle bad network conditions surprisingly well.
True, but what bothers me is the fact that we never got any de-sync, until we played it as the steps described above, and in that day we also played a chicken defence game, and no problems there.
Chicken is a Lua AI, which runs on every clients computer and thus not causing any network traffic.

In contrast, KAI is a normal AI, running on your (or maybe your friends) computer, and sending its commands over network. Don't know how efficient it is in terms of bandwith, but that you have 2 of them running might kill your internets.
xyz
Posts: 152
Joined: 29 Nov 2008, 16:06

Re: How to reproduce multi-player game de-syncs

Post by xyz »

Auswaschbar wrote:Chicken is a Lua AI, which runs on every clients computer and thus not causing any network traffic.

In contrast, KAI is a normal AI, running on your (or maybe your friends) computer, and sending its commands over network. Don't know how efficient it is in terms of bandwith, but that you have 2 of them running might kill your internets.
I will have to do some ore testing, because we use to play the same game configuration versus 2 KAI's but it never de-synced.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: How to reproduce multi-player game de-syncs

Post by Tobi »

I still suspect there is a bug causing long and sometimes infinite loops in current Spring tho, would be interesting if you managed to reproduce those, but 99% chance this is just KAI giving too many orders at the same time.
xyz
Posts: 152
Joined: 29 Nov 2008, 16:06

Re: How to reproduce multi-player game de-syncs

Post by xyz »

Tobi wrote:I still suspect there is a bug causing long and sometimes infinite loops in current Spring tho, would be interesting if you managed to reproduce those, but 99% chance this is just KAI giving too many orders at the same time.
Like trying to attack my plane with all the units? Sounds like a good explanation. Another thing that bothers me is how does the game manage to fall behind up to 10.000 frames (10000/20fps/60spm = 8 min) almost instantly?
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: How to reproduce multi-player game de-syncs

Post by Tobi »

Nah, what I was referring at really isn't a performance related thing.

It's 30 fps (simulation frames, which is what the number is), but 5.5 minute is still quite much yeah.
xyz
Posts: 152
Joined: 29 Nov 2008, 16:06

Re: How to reproduce multi-player game de-syncs

Post by xyz »

Tobi wrote:Nah, what I was referring at really isn't a performance related thing.

It's 30 fps (simulation frames, which is what the number is), but 5.5 minute is still quite much yeah.
I mean the AI gives an attack order to all its units to attack my plane, ant then it needs to send that order over the network, and as there are about 1000 units (500 per player) that's a lot of traffic, in one frame I suspect.

As for the 10.000 frame lag, I got that form the de-sync message, the one with: "Delay response for frame ### current frame ###", and from the fact that talking to my friend he was seeing actions that happened on my screen a long long time ago.
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Re: How to reproduce multi-player game de-syncs

Post by yuritch »

"Delayed sync responce" is not a desync, it's just lag. It comes away if the condition that caused it disappears (like the 1000 units being killed).
Desync is "Sync error for <player name> in frame <number>". It does not go away, once it happened, the game is ruined - every client is effectively playing his own game.
xyz
Posts: 152
Joined: 29 Nov 2008, 16:06

Re: How to reproduce multi-player game de-syncs

Post by xyz »

yuritch wrote:Desync is "Sync error for <player name> in frame <number>". It does not go away, once it happened, the game is ruined - every client is effectively playing his own game.
This is what happened, eachone was playing its own game; I will have to play it again and get the infolog. Is the replay any good? I think I still have it.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: How to reproduce multi-player game de-syncs

Post by lurker »

No, lagging like that means that your commands will take ages to register, but you're not playing different games. Player(s) are stuck viewing the past in the same game.

Unless it actually said "sync error" ?
xyz
Posts: 152
Joined: 29 Nov 2008, 16:06

Re: How to reproduce multi-player game de-syncs

Post by xyz »

OK I will have to get the infolog, I will post back here when I got them.
Post Reply

Return to “Engine”