Bad experience with 0.14 multiplayer: Slow map download, lag

Things that has been reported already before.
Post Reply
Ralfinator
Inserter
Inserter
Posts: 33
Joined: Sun Jun 26, 2016 9:37 pm
Contact:

Bad experience with 0.14 multiplayer: Slow map download, lag

Post by Ralfinator »

After a long pause due to vacations, I started again playing some Factorio multiplayer with two friends. So we upgraded our games to 0.14.12 and were excited to test the new multiplayer code. Unfortunately though, things overall worked less well than they did on 0.13. I will try to describe some of the issues here, but I do realize that distilling any concrete problems out of this may be hard. I hope it is still useful as a data point.

First of all, we *did* use some mods, which is (I assume) what caused the one desync we experienced, so I don't consider that part of this bugreport. However, the other issues feel like mods shouldn't interfere here; still, if you think that's helpful we could try without mods some other time.
Here's the list of mods: Bottleneck_0.3.3.zip, Expanded_Robot_Tech_0.4.2.zip, long-reach_0.0.6.zip, robotarmy_0.2.3.zip, YARM_0.7.107.zip.

The network setup is as follows:
* Player A is the host, using Windows. He has 50 MBit/s downlink and at least 5 MBit/s uplink.
* Player B is using Linux and has 16 MBit/s down and 0.7 MBit/s up.
* Player C is using Linux and has 3 MBit/s down and 0.3 MBit/s up.
* We are playing via the internet, but the physical distances to the host are not too large: C is the furthest away from A with 150km, and a ping of 60ms.
* The map is sizeable (45MB), but still small compared to some of the things I saw on YouTube. The map was created with 0.13 and loaded in 0.14 without any problems.

The first regression compared to 0.13 is the map download: As the 0.13 series progressed, map download got better and better, to the extend that player C could pretty reliably download the map with half his downlink (~160 kByte/s), which takes a couple of minutes. With 0.14.12, the download rate also reaches half the download at its peak, but it will frequently drop down to below 1 kByte/s and then move up again; this puts the average download speed more in the range of 50-80 kByte/s, more than doubling the time it takes to download the map.

Next, the "catching up" after downloading the map: We had player B join into the game with A+C already properly joined. The download takes him < 1 minute. However, he is then unable to catch up: His machine (a quad-core with a single-core turbo frequency of 4.1 GHz) is constantly at full load on one CPU core, but he doesn't get any closer to "now". We then paused the game, after which it took him more than three minutes to catch up. It seems we will have to manually pause the game while people are downloading, or else they will never be able to catch up even with a powerful computer.

Finally, in-game lag: We used to set the lag to 100ms with 0.13, and that made for a pretty smooth and stable playing experience for all of us as long as B+C made sure that their internet connection was not used by anything else. With 0.14, of course the host (A) was happy to see no lag whatsoever, but for B and C, the lag would vary greatly. Sometimes it would be hardly noticeable, but it could also get so bad as to make moving across the map pretty hard, because the player character kept jumping back and forth. Three times it got so bad that we couldn't move at all - pressing the movement buttons just did nothing, we had to cancel the game (Alt+F4) and re-join.

I hope you can find some way to extract information from this report that makes it possible for you to improve the situation. I am grateful for the hard work you put into the game, and I know by experience how frustrating it can be to debug such kinds of problems in networked games. If you need any further information, I'll try to provide more details.

kovarex
Factorio Staff
Factorio Staff
Posts: 8078
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Bad experience with 0.14 multiplayer: Slow map download, lag

Post by kovarex »

The download speed fixes are still in progress for 0.14

The catching up might be a problem if the server is faster than the clients and the map is too big to run smoothly. The only workaround is to slow down the game simulation. (/c game.speed = 0.5) for example. This way, there is more time to simulate the factory on slower computer so he doesn't fall behind.
The lag you describe is most probably not the network lag, but the fact that the client is too slow and it is falling behind. The speed solution should solve this as well.

We are planning some overall game optimisations for 0.15, so the game should be able to handle bigger factories without slowing down, so we shall see.

Ralfinator
Inserter
Inserter
Posts: 33
Joined: Sun Jun 26, 2016 9:37 pm
Contact:

Re: Bad experience with 0.14 multiplayer: Slow map download, lag

Post by Ralfinator »

Thanks for the fast response! Good to hear you are working on the download speed :)

As far as I know, B's computer is actually faster than A's; it's certainly faster than C's who had less problems.
The only workaround is to slow down the game simulation. (/c game.speed = 0.5) for example. This way, there is more time to simulate the factory on slower computer so he doesn't fall behind.
So this will effectively put the factory to 30 fps? (And also kill achievements, I guess :/ )

Post Reply

Return to “Duplicates”