Page 1 of 1

belt building in multiplayer

Posted: Tue Jul 09, 2019 10:50 pm
by linux_zealot
While I was watching a youtube video of a person playing on a multiplayer server I noticed a difference in appearance between building belts in multiplayer and what I'm used to see in singleplayer.

In single player, when you click the belts appears instantaneously in they final form. In multiplayer at first they appears as if they are not connected to the adjacent belt and only a few hundred milliseconds later they take their final appearance. You can see how it looks in the attachment as well on youtube: https://www.youtube.com/watch?v=tHdocP7qkNQ&t=2455 .

As I understand this is related to the fact that it takes some time for your actions to be sent to server and to get a confirmation back. When the game gets the confirmation from server the belts take their final form.

At first I thought that this must be some bug. But then I thought that it is so apparent that it must have been reported already or perhaps this is done intentionally. Does anybody know why not render belts continuous even when the response from server is not yet received? Or is it a bug that should be reported?

Re: belt building in multiplayer

Posted: Wed Jul 10, 2019 8:22 pm
by Tyrithe
I'm sure the Devs will reply to this as soon as they get a chance, honestly the development of Factorio has been very interesting.

To be honest, My first thought on this was that it's a bug but I think it's intentional but an oversight in this regard.
Personally I feel that it's weird behavior for the game to assume the tiles are not connected as they would be in SP. I'm not sure why MP skips the auto connection process in MP, It's going to do it anyway right? Is it even possible to place a tile in an unconnected state and have it stay?

Maybe the client process is that the items don't even exist in SP it just places them like blueprints or ghosts. So the player can see where they are in the world instead of having to wait for them to processed by server before the client displays them. As such because they're not classed as what they would be normally no auto connection code in the client is run on them.

From my point of view this is just a visual thing and shouldn't interfere with client/server networking, So it's more than possible that they'll change it if they agree.

TL;DR
feature request? :D

Re: belt building in multiplayer

Posted: Thu Jul 11, 2019 6:10 pm
by Rakshasa
Multiplayer should just show not-yet-really-built stuff as a different color version of ghost buildings.

Re: belt building in multiplayer

Posted: Wed Jul 17, 2019 7:30 pm
by Expunge
Correct me if I'm wrong buuuut..

The placement of the belt has to synchronize between your local client, the server, and all the other clients. Every client calculates the simulation of the entire world in simultaneous lock-step. So the delay you're seeing is the time it takes for this entire process to occur, which would be tied to the person with the highest latency connection to the server.

Re: belt building in multiplayer

Posted: Wed Jul 17, 2019 10:55 pm
by Oktokolo
The fix would be to change the display code to make server-unconfirmed belts look like confirmed belts.

Re: belt building in multiplayer

Posted: Thu Jul 18, 2019 12:43 am
by Jap2.0
Expunge wrote:
Wed Jul 17, 2019 7:30 pm
Correct me if I'm wrong buuuut..

The placement of the belt has to synchronize between your local client, the server, and all the other clients. Every client calculates the simulation of the entire world in simultaneous lock-step. So the delay you're seeing is the time it takes for this entire process to occur, which would be tied to the person with the highest latency connection to the server.
Almost, but not quite - the time it takes is your latency to the server. Factorio doesn't synchronize all the players to each other, just to the server, so having higher latency only delays the game for you (and your actions for others).

Re: belt building in multiplayer

Posted: Thu Jul 18, 2019 10:14 am
by Zavian
Oktokolo wrote:
Wed Jul 17, 2019 10:55 pm
The fix would be to change the display code to make server-unconfirmed belts look like confirmed belts.
I doubt that would really fix what you are seeing. Instead of seeing the delay before the belt is properly connected, instead you would see a delay before items started using the newly built belt segments. Personally I think it would be less jarring to see that the belt isn't properly connected, than to see a belt that looks properly connected, but that items can't use.

Re: belt building in multiplayer

Posted: Thu Jul 18, 2019 7:45 pm
by Oktokolo
Zavian wrote:
Thu Jul 18, 2019 10:14 am
Oktokolo wrote:
Wed Jul 17, 2019 10:55 pm
The fix would be to change the display code to make server-unconfirmed belts look like confirmed belts.
I doubt that would really fix what you are seeing. Instead of seeing the delay before the belt is properly connected, instead you would see a delay before items started using the newly built belt segments.
Easy to solve: Don't animate the new fully-connected belts until confirmation.
Would look better than the status quo while clearly indicating the non-confirmed state in an "immersion"-friendly way.