PDA

View Full Version : Awful delay and synchronization over Internet during play


Boriso
16 Oct 2010, 06:14
Hello!

When Steam News announced WR my friend and I had bought this game for playing over Internet with each other.

Now we are disappointed. The problem is that movements on one computer transferred to the another with a significant delay of several seconds. It is disgusting to hear "Oh, no" or "I did it" from my friend on Skype and wait to see a corresponding delayed action in the game.

Why this happens? What is the problem in synchronization or reducing delay for just half a second?

Now there are many games with real-time action and no problems in sync. Libraries and algorithms are researched and well known. Even in AJAX chats delay is less :(


P.S. Constant problem with video running one fourth of a screen and need in pressing "apply" in video settings to fix it, unreasonable camera movements to the bottom right and other problems are bad but we can handle them just restarting the game.

FIX the DELAY problem, PLEASE!

jsgnext
16 Oct 2010, 20:24
"Delay between turns" occur in every turn based online game, not just worms(Gunbound For example)....if you dont want delay, and want lag instead....play a realtime game....

Boriso
16 Oct 2010, 21:17
jsgnext,
this is thread about Worms Reloaded game. Have you ever played it?

1. You have quoted (in "quotes") phrase "Delay between turns" that didn't exist in my original post (there were no word "turn").

2. In Worms one can already monitor other players "movements" during their turns (not just results).

3. You'll be suprissed, but there are some lags in game sometimes. To prevent all lags one needed to wait 30-45-90 seconds (for his oponent moves) and then watch a full pack of movements. In this case there will be no lags in theory.


Here is an illustration of delay problem:

1. I have 30 seconds for a turn and start moving
2. I have 29 seconds left for a turn
3. I have 28 seconds left for a turn
4. I have 27 seconds left for a turn, but my friend just started to watch my movements and see a counter of 30 seconds
5. I have 26 seconds left for a turn, but counter on my friends computer is only 29
6. ...
7. ...
30. I have 1 seconds left for a turn, but my friend still watch a 3-seconds delayed "video" and counter with 4 seconds left.
31. My turn is over, I cried "Hooray" or "Oh, no" over a phone, but my friend hear me and knows exactly what is result of the next 3 seconds would be. - THIS IS HORRIBLE! It is like watching a film next to somebody commenting every next action.

As you see there is no problem in bottleneck of information transfer, the only need is in synchronizing turn movements translation for other players.

There are no lags in Skype, no lags in Team Fortress 2, Alien Swarm, Left 4 Dead, Left 4 Dead 2 and other games. Why make Worms game worse?

Squirminator2k
17 Oct 2010, 00:18
The delay in Worms Reloaded is particularly bad when compared to the delay in, for example, Worms Armageddon. It's significantly worse.

MtlAngelus
17 Oct 2010, 01:43
^ True.

I mean, I would understand if such a delay helped prevent syncronization issues, but W:A hardly ever gets that, and WR gets them so often that you would think it's a game feature...

Plutonic
17 Oct 2010, 13:02
True, it is a lot worse than in WA, but I don't think it's a bug, I think it has a 5 second delay on perpose. The steamworks net stuff is more designed for the FPS, I imagine there was a lot of effort involved in getting it to work nicely with something like worms.

Darkspark
17 Oct 2010, 14:02
True, it is a lot worse than in WA, but I don't think it's a bug, I think it has a 5 second delay on perpose. The steamworks net stuff is more designed for the FPS, I imagine there was a lot of effort involved in getting it to work nicely with something like worms.

I think the original poster is talking about the "Waiting for Players" message, not the 5 second wait before a turn starts. I've noticed it getting worse. It shouldn't take so long.

Is it really difficult to implement a hosting structure like that that Modern Warfare 2 uses? E.g. you have a host, and if they leave, the game is passed onto the next person with the best connection within 5 seconds.

Waiting is LITERALLY killing the number of players in the game.

Thurbo
17 Oct 2010, 17:19
No, he isn't either.

jsgnext, Here is an illustration of delay problem:

1. I have 30 seconds for a turn and start moving
2. I have 29 seconds left for a turn
3. I have 28 seconds left for a turn
4. I have 27 seconds left for a turn, but my friend just started to watch my movements and see a counter of 30 seconds
5. I have 26 seconds left for a turn, but counter on my friends computer is only 29
6. ...
7. ...
30. I have 1 seconds left for a turn, but my friend still watch a 3-seconds delayed "video" and counter with 4 seconds left.
31. My turn is over, I cried "Hooray" or "Oh, no" over a phone, but my friend hear me and knows exactly what is result of the next 3 seconds would be. - THIS IS HORRIBLE! It is like watching a film next to somebody commenting every next action.

That's what he means.

Plutonic
17 Oct 2010, 18:18
I know exactly what he is talking about, and yes implementing host migration is that difficult.

Squirminator2k
17 Oct 2010, 20:13
Here is an illustration of delay problem:

1. I have 30 seconds for a turn and start moving
2. I have 29 seconds left for a turn
3. I have 28 seconds left for a turn
4. I have 27 seconds left for a turn, but my friend just started to watch my movements and see a counter of 30 seconds
5. I have 26 seconds left for a turn, but counter on my friends computer is only 29
6. ...

[...]

There are no lags in Skype, no lags in Team Fortress 2, Alien Swarm, Left 4 Dead, Left 4 Dead 2 and other games. Why make Worms game worse?

There's no lag in TF2/AS/L4D et al. because those are real-time games. Worms is a complex engine with a lot of variables and there is naturally going to be a delay as that data is shared to the other players. WA had that delay of a few seconds. So did W2 and WWP. I believe the 3D games also had that delay. Hell, Rock Band has a brief delay between the players and tallies the totals up at the end of the game. It's unavoidable.

_Kilburn
17 Oct 2010, 20:30
To be honest, I don't see how Worms has more variables than any of the games you cited. You can easily do pretty complex turn based games with the Source Engine, and it will still play nicely with very minor latency.

Although I guess proper lag compensation is quite hard to implement correctly, and wouldn't be worth a game which is turn based only.

Squirminator2k
17 Oct 2010, 20:31
TF2/L4D et al. can get away with transmitting approximate information for things like player locations and so forth. Worms can't - it has to be pixel-precise.

Boriso
18 Oct 2010, 05:16
Plutonic,


"The steamworks net stuff is more designed for the FPS, I imagine there was a lot of effort involved in getting it to work nicely with something like worms."

why do you think that using "one sender - many recipients" model is very hard to implement in already working environment for "many senders - many recipients" model?



"implementing host migration is that difficult"

do you mean that during every turn change W:R game entirely re-initializes client-server network architecture and not just making terms replacement?


P.S. Probably the main reason is an open vacancy for "Experienced Network Programmer" :(

SilPho
18 Oct 2010, 21:02
It can't be that difficult to send the information over the network, if I can stream HD video I'm sure I can transfer the keystrokes necessary to recreate the game-state on someone elses machine. Look at most WA replay files, even with the map information in there you can still send that entire file in one second, there can't be that much to send.

If I had to guess, I'd say the time delay was deliberate. It can't be a slow connection since you can often receive in-game chat messages before the corresponding action has transpired on screen. If there was a genuine delay those chat messages would be delayed too.

Squirminator2k
18 Oct 2010, 21:04
There's a bit of a difference between streaming video and transmitting pixel-precise movement and location data, SilPho.

Sigh. This is what happens when people who don't understand network coding discuss why it doesn't work.

Thurbo
18 Oct 2010, 21:24
I don't understand how it works either though understand why there's this delay. I'm just wondering, is there no way to get rid of it? By using a different engine or something? Is there just any possible solution?

Because if so, I'd like to see Team17 fixing it.

Squirminator2k
18 Oct 2010, 21:29
It's not really a "fixable" thing - it's a deliberate delay. It was present in Worms 2, Worms Armageddon, Worms World Party, Worms 3D, Worms Forts, Worms 4: Mayhem, Worms Open Warfare 2, and the Xbox/PS3 versions of Worms and Worms 2: Armageddon. Switching engines isn't going to change the amount of data that has to be sent, and isn't going to close that gap.

As I said, this isn't like some FPS game where transmitting approximate location data in real-time is a good enough solution. This is a turn-based strategy which has to transmit precise data for the position of worms, mine movement, crate movement and explosions (including flames), explosion size and strength, weapon trajectory, all of that stuff. It has to transmit that data as accurately as possible and currently it's not feasible to transmit that sort of data in real-time. That's why Team17 didn't include an online mode in Worms Blast back in the day.

Thurbo
18 Oct 2010, 21:35
Even with the delay the game sometimes desyncs (so did the PSP version of OW2, not sure about W2:A). How come? It doesn't happen in any other Worms. At very least this should be fixed - or is there no possibility either?

Plutonic
19 Oct 2010, 09:31
Plutonic,


"The steamworks net stuff is more designed for the FPS, I imagine there was a lot of effort involved in getting it to work nicely with something like worms."

why do you think that using "one sender - many recipients" model is very hard to implement in already working environment for "many senders - many recipients" model?



Many FPS' work on client-server model, all client send up minimal data to the server, which then processes the data to move players around etc, and then sends its own data down to all the clients.

Worms worms on a peer to peer system where the "server" or authorative client is the machine who is currently taking its turn. However the network does this switch is irrelevant, either way the entire and exact state of the game must be available on all machines at all times for the game to work.


"implementing host migration is that difficult"

do you mean that during every turn change W:R game entirely re-initializes client-server network architecture and not just making terms replacement?


It's possible, but I was actually only replying this this:


Is it really difficult to implement a hosting structure like that that Modern Warfare 2 uses?

SilPho
19 Oct 2010, 23:33
If it had to transmit all of that data I'd agree, but as far as I can tell it would only need to transmit keystrokes and mouse click locations, the rest would be worked out by the engine on the fly. A delay is unavoidable, but I'm fairly sure it could be reduced with enough tweaking.

Of course, in a turn based game, the delay isn't game breaking.

Thurbo
20 Oct 2010, 14:15
If it had to transmit all of that data I'd agree, but as far as I can tell it would only need to transmit keystrokes and mouse click locations, the rest would be worked out by the engine on the fly.

I think the problem here would be that Worms Reloaded is a little random (OW2 was anyway). For example, even if you use the buffalo two times in the same environment with the same conditions, there wouldn't happen the same thing. Several stuff like the buffalo's recoil is just completely random. Same goes for weapons like the banana or clusters.

SilPho
20 Oct 2010, 14:22
True, but there is randomness in every Worms game, all it needs to do is send the random seed it is using for the calculation.

I'm just saying that in theory it should be possible to greatly reduce the delay. Maybe there is a reason in place, but if there is I can't think of it.

Darkspark
20 Oct 2010, 17:38
There's a bit of a difference between streaming video and transmitting pixel-precise movement and location data, SilPho.

Sigh. This is what happens when people who don't understand network coding discuss why it doesn't work.

That enlightens me a little as to how networking is carried out.

If I remember correctly, when I made a move in W:A, then replayed it online, the events that occurred in the replay were sometimes slightly different to my actual move in the game, and the replay would overwrite what actually happened in the game.

For instance, a bazooka shot would hit a worm and do damage, but a slight change in the replay might lead to that worm falling off the landscape as a result of a shot that looked very similar, but obviously not EXACTLY the same.

Is that possibly whats happening here? Is that why W:R needs so much time to calculate movements precisely? To avoid this situation happening, and why replays are disabled?

Boriso
20 Oct 2010, 20:47
Of course it is not so easy to transfer exact picture of pixels from one computer to another, but it is possible to transfer keystrokes and some sensitive data like seeds and effects (for example, hit points, falling and new position, etc.). Optimization and clear mind is the key. It would never be a problem if there are some several pixels difference in picture but effects are the same, because there are already many glitchs in the game.

My main point is that
1) network algorithms are already coded,
2) connections bandwidth is enough for transfer,
SO
there is NO need in shifting (delaying) movements. After a moment when initial buffer is filled and transferred, any delays in movements transfer are the same from the data flow point of view.

Team 17, please, if you need more initialization time increase pause between turns, but reduce the delays during movements...


Darkspark
There is no "network" reason for disabling replays, because all data needed for it have already been transferred and played.