[17.50] Possible determinism issue involving belts, worms and lag

Things that we don't consider worth fixing at this moment.
Post Reply
User avatar
Dev-iL
Fast Inserter
Fast Inserter
Posts: 220
Joined: Thu Jul 02, 2015 2:48 pm
Contact:

[17.50] Possible determinism issue involving belts, worms and lag

Post by Dev-iL » Thu Jun 20, 2019 7:23 am

Consider the scenario of standing on a circular belt next to some worms and/or spitters. If standing at the correct radius, one can just stand there indefinitely w/o being hit, as shown below:

Image

As a non-server player participating in MP games, I've encountered a strange phenomenon when lag (be it due to network conditions, the local PC not keeping up, or a combination thereof) is introduced into the mix. What happens is the character appears to stay in one place for more than one tick, causing the worms to shoot directly at the circle, as if the player is in fact standing in place. I noticed this also happens sometimes when standing on the belts and shooting, where the act of shooting appears to decrease the character's movement speed on the belt - allowing the worms to adjust their aim and hit.

It is as though, if player input isn't received in time, they are considered not to move at all (i.e. ignoring the fact they stand on a moving belt). I claim that this is a determinism issue, because no player input is required to know the belt will influence the player's position on the next tick if he's currently standing on it - and this assumption appears to be broken.

Unfortunately I have no idea how to simulate lag locally, so I cannot test whether my explanation is the correct cause of my observations (and whether it's enough to reproduce it), but there's definitely something fishy going on.
Attachments
Determinism.zip
The scenario shown in the screenshot.
(118.87 KiB) Downloaded 4 times
Leading Hebrew translator of Factorio.

Stevetrov
Long Handed Inserter
Long Handed Inserter
Posts: 63
Joined: Tue Jun 14, 2016 7:04 am
Contact:

Re: [17.50] Possible determinism issue involving belts, worms and lag

Post by Stevetrov » Fri Jun 21, 2019 8:08 am

If this was an issue, then it would cause desyncs every time a player who was lagging slightly stood on a belt without immunity.

It appears that players moving on belts is treated as a player input rather than something that happens automatically. I dont know why this is, but I expect there is a good reason.

EnigmaticAussie
Long Handed Inserter
Long Handed Inserter
Posts: 89
Joined: Mon Dec 18, 2017 7:53 am
Contact:

Re: [17.50] Possible determinism issue involving belts, worms and lag

Post by EnigmaticAussie » Fri Jun 21, 2019 10:54 am

I don't think this is a determinism issue at all.
It's simply the worms/spitters trying to "guess" where you will be if you continue to move at the current speed and direction. And they aim there.

Since the player is "constantly moving" while being stationary on a belt (still moving relative to the enemy), they will never aim at the belts/player directly.

Theikkru
Fast Inserter
Fast Inserter
Posts: 121
Joined: Wed Mar 27, 2019 2:18 pm
Contact:

Re: [17.50] Possible determinism issue involving belts, worms and lag

Post by Theikkru » Fri Jun 21, 2019 8:05 pm

EnigmaticAussie wrote: ↑
Fri Jun 21, 2019 10:54 am
I don't think this is a determinism issue at all.
It's simply the worms/spitters trying to "guess" where you will be if you continue to move at the current speed and direction. And they aim there.

Since the player is "constantly moving" while being stationary on a belt (still moving relative to the enemy), they will never aim at the belts/player directly.
The whole point is that they DO shoot at the player directly sometimes under laggy circumstances.

Rseding91
Factorio Staff
Factorio Staff
Posts: 9440
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [17.50] Possible determinism issue involving belts, worms and lag

Post by Rseding91 » Fri Jun 21, 2019 10:05 pm

Thanks for the report. As it works now when you fall behind the game simulation or your latency changes the game stops belts from moving your character while you catch up.

It's non-trivial to change that and I'm not even sure if we want to change it. It makes for a nice side effect of not moving the camera while you're catching back up to the server.
If you want to get ahold of me I'm almost always on Discord.

User avatar
Dev-iL
Fast Inserter
Fast Inserter
Posts: 220
Joined: Thu Jul 02, 2015 2:48 pm
Contact:

Re: [17.50] Possible determinism issue involving belts, worms and lag

Post by Dev-iL » Sat Jun 22, 2019 1:29 pm

Rseding91 wrote: ↑
Fri Jun 21, 2019 10:05 pm
Thanks for the report. As it works now when you fall behind the game simulation or your latency changes the game stops belts from moving your character while you catch up.
Ok, thanks for confirming my suspicions.
Leading Hebrew translator of Factorio.

User avatar
Dev-iL
Fast Inserter
Fast Inserter
Posts: 220
Joined: Thu Jul 02, 2015 2:48 pm
Contact:

Re: [17.50] Possible determinism issue involving belts, worms and lag

Post by Dev-iL » Sat Jul 06, 2019 5:15 am

Some technical clarifications related to this issue are now available as part of FFF #302:
Twinsen wrote:the server and the latency queue need to properly inject a special Input Action called StopMovementInTheNextTick when the above mechanisms come into play. This prevents your character from running by himself (e.g. in front of a train) while experiencing connection problems.
... and also be moved by belts, right?
Twinsen wrote:what you need to know is that since Version 0.17.54 released yesterday, multiplayer will be more stable and latency hiding will be much less glitchy (less rubber banding and teleporting) when experiencing temporary connection problems. I also changed how latency hiding is handled in combat, hopefully making it look a bit smoother.
At least the shooting part was improved in 0.17.54. Although his work is probably unrelated to my bug report, I'm fine with this sort of wontfixing ;)
Leading Hebrew translator of Factorio.

Post Reply

Return to β€œWon't fix.”

Who is online

Users browsing this forum: No registered users