Pause multiplayer game for first logon / Reduce catch-up time for (first) logon/other players by pausing

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Post Reply
Recon777
Filter Inserter
Filter Inserter
Posts: 267
Joined: Fri Jun 10, 2016 4:04 am
Contact:

Pause multiplayer game for first logon / Reduce catch-up time for (first) logon/other players by pausing

Post by Recon777 »

TL;DR
1: When a multiplayer server has no one logged on, the game should remain paused until the first player finishes loading.
2: Add optional consent to pause game while others log on.

Problem:
Factorio has a multiplayer feature that allows players to log into the game without interrupting everyone else who is currently in-game. It does this by quickly saving a local copy of the map and then running the simulation as fast as it can on the new player's machine until all the events are "caught up" and in sync with the server's live running copy. While this is happening, the new player has a "Catching Up" progress bar showing how far they are along in this process. This is the process of simulating everything which takes place during the time disparity between the point where the server saved the game and the point where the new player's computer received and loaded this file. The amount of time this takes depends on how many new events are being generated on the server vs how fast the new player's computer can process them.

For very large multiplayer factories, it can become extremely slow because so many events are happening while the new player is trying to load and "catch up". In theory, if a factory is large enough, it would be impossible for the new player to process events faster than the server itself. In times like this, it is sometimes a good idea to have someone on the server pause or slow down the game so that the new player can catch up sooner.
Solution:
What I propose is that when a server has NO players online, the simulation is paused entirely while the first person loads the game. There is no reason for the very first person to log onto an empty server to have a "catching up" phase because nobody is online to be inconvenienced by the pause. Additionally, if this were smartly implemented, the server should recognize when a new player is having trouble "catching up" and send a message to anyone who is online asking if they would be okay pausing the game or slowing it down so that the new player can catch up.
Why ?
The reason I believe this is a worthwhile feature that increases the value of Factorio as a game is because it preserves the incentive to build massive multiplayer factories. Currently, as things get very large after perhaps a month of cooperative building, the game becomes so burdensome to load that the enjoyment factor decreases below the level which makes it worth playing. This change will allow for players of multiplayer mega-bases to log on without having to take several minutes to load, or perhaps, not being able to catch up at all. This is especially true for servers which spend a fair bit of time with nobody logged on, and that first person should not have to "catch up" at all.
Last edited by ssilk on Sat Jul 16, 2022 8:33 am, edited 1 time in total.
Reason: Changed topic more into general direction of this thread

Loewchen
Global Moderator
Global Moderator
Posts: 8285
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: Pause multiplayer game for first logon

Post by Loewchen »

What you propose is exactly how it works already. If no player is online the server is paused until a player has entered the game, so entering an empty server will never require catching up to it. The only exception is if the server has pause-when-empty disabled but that is incredibly rare.

On the second part of pausing/slowing down generally when someone downloads the map, it is important to keep in mind that if someone is hardly able to run the map faster than the server while catching up, he has no chance of keeping up when he needs to do the rendering on top of that. In some way the catch up phase is a good benchmark to find out if you even can play on the server at all.

Zavian
Smart Inserter
Smart Inserter
Posts: 1641
Joined: Thu Mar 02, 2017 2:57 am
Contact:

Re: Pause multiplayer game for first logon

Post by Zavian »

Unless this has changed since 0.14, then it doesn't quite work like the OP is suggesting. Back in 0.14 at least, the server would be paused when no-one was connected, but would un-pause when the first player connects. The op is requesting that it not un-pause until the first player has finished downloading the map (that would be effectively the same as un-pausing when the first player has caught up, because catching up would be instant).

Back in 0.14 I played around 40 hrs on a server where my computer was struggling to keep up with the server, and for quite a bit of this time I was the only player online. I would regularly log on to the server, spend 3 mins downloading the map and then 30 mins in the catch-up phase before being able to play. So +1 from me regarding the OP's first request.

Regarding the second request, players can already see when other players are joining and catching up. If they have pause rights, they can already pause the game to help someone catch-up if desired. The devs have suggested that they would like to implement a feature to automatically slow down the server when players are struggling to keep up. If they did that, then such a feature could probably be extended to run the game at a slow speed whilst players are catching up. (Obviously I expect such features to be configurable, so server admins could also disable such features, and limit the minimum speed).

Recon777
Filter Inserter
Filter Inserter
Posts: 267
Joined: Fri Jun 10, 2016 4:04 am
Contact:

Re: Pause multiplayer game for first logon

Post by Recon777 »

Loewchen wrote:If no player is online the server is paused until a player has entered the game, so entering an empty server will never require catching up to it.
Except this is not what happens. When I enter an empty server, I still have the lengthy "catching up" phase to wait through. Likely, this is because the simulation unpauses at the time I download the map rather than the time my game is fully loaded and ready to go.

Zavian wrote:The op is requesting that it not un-pause until the first player has finished downloading the map (that would be effectively the same as un-pausing when the first player has caught up, because catching up would be instant).

Back in 0.14 I played around 40 hrs on a server where my computer was struggling to keep up with the server, and for quite a bit of this time I was the only player online. I would regularly log on to the server, spend 3 mins downloading the map and then 30 mins in the catch-up phase before being able to play. So +1 from me regarding the OP's first request.
Yes, this is exactly what I'm talking about. Except I want it to unpause when I have finished LOADING and am ready to actually play, NOT when I am finished downloading the map. Downloading is relatively quick if the server has a fast upload speed.
Zavian wrote:Regarding the second request, players can already see when other players are joining and catching up. If they have pause rights, they can already pause the game to help someone catch-up if desired.
I'm not sure if it is true, but I read someone saying that pausing or slowing down the server manually for someone to catch up quicker only works if it is done BEFORE the new person tries to connect. Can someone verify whether pausing the game AFTER the connection attempt will speed up that person's catching-up phase?
Last edited by Recon777 on Sun Sep 17, 2017 4:54 am, edited 1 time in total.

Zavian
Smart Inserter
Smart Inserter
Posts: 1641
Joined: Thu Mar 02, 2017 2:57 am
Contact:

Re: Pause multiplayer game for first logon

Post by Zavian »

My understanding is that pausing during download or catch-up will reduce the time it takes a player to catch-up, by reducing the number of ticks the joining player's computer needs to process before thay are caught up.

Jap2.0
Smart Inserter
Smart Inserter
Posts: 2339
Joined: Tue Jun 20, 2017 12:02 am
Contact:

Re: Pause multiplayer game for first logon

Post by Jap2.0 »

Recon777 wrote:
Loewchen wrote:If no player is online the server is paused until a player has entered the game, so entering an empty server will never require catching up to it.
Except this is not what happens. When I enter an empty server, I still have the lengthy "catching up" phase to wait through. Likely, this is because the simulation unpauses at the time I download the map rather than the time my game is fully loaded and ready to go.

Zavian wrote:The op is requesting that it not un-pause until the first player has finished downloading the map (that would be effectively the same as un-pausing when the first player has caught up, because catching up would be instant).

Back in 0.14 I played around 40 hrs on a server where my computer was struggling to keep up with the server, and for quite a bit of this time I was the only player online. I would regularly log on to the server, spend 3 mins downloading the map and then 30 mins in the catch-up phase before being able to play. So +1 from me regarding the OP's first request.
Yes, this is exactly what I'm talking about. Except I want it to unpause when I have finished LOADING and am ready to actually play, NOT when I am finished downloading the map. Downloading is relatively quick if the server has a fast upload speed.
Zavian wrote:Regarding the second request, players can already see when other players are joining and catching up. If they have pause rights, they can already pause the game to help someone catch-up if desired.
I'm not sure if it is true, but I read someone saying that pausing or slowing down the server manually for someone to catch up quicker only works if it is done BEFORE the new person tries to connect. Can someone verify whether pausing the game AFTER the connection attempt will speed up that person's catching-up phase?
This is how catching up works: The server saves the map, the player downloads the map, and then the player has to process all the ticks that have happened between where the map state was when it was downloaded and when they join. So if the map is paused from before they download the map until after, there are no new ticks to process. If the game (@ 60 UPS) is paused 1 second after the map is downloaded, the player has to process those 60 ticks - less than 1 second of time. Now if the map takes 5 seconds to download, but your computer can only run the map at 55 UPS, then you will never be able to play unless the server is always slowed down for you. If you can run the map @ 120 UPS (which usually is impossible on the large maps on servers), then it will take 10 seconds to connect - 5 to download, then 120 UPS for 5 seconds is 600 updates - how many the game makes in those 10 seconds. Slowing down the game will speed the catching up process up, as well as having a faster download or better computer.
There are 10 types of people: those who get this joke and those who don't.

Recon777
Filter Inserter
Filter Inserter
Posts: 267
Joined: Fri Jun 10, 2016 4:04 am
Contact:

Re: Pause multiplayer game for first logon

Post by Recon777 »

Jap2.0 wrote:This is how catching up works: The server saves the map, the player downloads the map, and then the player has to process all the ticks that have happened between where the map state was when it was downloaded and when they join. So if the map is paused from before they download the map until after, there are no new ticks to process. If the game (@ 60 UPS) is paused 1 second after the map is downloaded, the player has to process those 60 ticks - less than 1 second of time. Now if the map takes 5 seconds to download, but your computer can only run the map at 55 UPS, then you will never be able to play unless the server is always slowed down for you. If you can run the map @ 120 UPS (which usually is impossible on the large maps on servers), then it will take 10 seconds to connect - 5 to download, then 120 UPS for 5 seconds is 600 updates - how many the game makes in those 10 seconds. Slowing down the game will speed the catching up process up, as well as having a faster download or better computer.
So why do I get a lengthy "catching up" phase when I am joining our empty server?
Why are there ticks to process which happened after I download the map if the game should be paused anyway?

Zavian
Smart Inserter
Smart Inserter
Posts: 1641
Joined: Thu Mar 02, 2017 2:57 am
Contact:

Re: Pause multiplayer game for first logon

Post by Zavian »

Because, as I understand things, the server unpauses when you connect, not when you finish downloading and loading the map. So if it take you 10 seconds to download and load the map, that means that by the time you have loaded the map the server will be 600 ticks ahead of your computer. If your computer can only process the game at 65 ticks a seconds, then it has a net catch up rate of only 5 ticks/second (65 ticks/sec minus the 60 ticks/sec the server is still running) and it will take 120 seconds to catch up.

(And if another player were to pause the game to help you to catch up it would take less than 10 seconds to catch up).

Obviously exactly how long it takes you to catch up is highly dependent on how long it takes you to download and load the map, and how long your computer takes to process each tick.

Recon777
Filter Inserter
Filter Inserter
Posts: 267
Joined: Fri Jun 10, 2016 4:04 am
Contact:

Re: Pause multiplayer game for first logon

Post by Recon777 »

Yes obviously that is what is going on... But why?

That is the point of my suggestion. To have the server NOT do this. To have it only unpause the game once you're fully loaded. There's absolutely no reason to be running the simulation (especially at full speed) while the very first person is loading up. It would save a lot of people a lengthy catching up phase to just have the game unpause once the first person is actually in the game.

vtx
Fast Inserter
Fast Inserter
Posts: 150
Joined: Tue Jun 28, 2016 9:48 am
Contact:

Re: Pause multiplayer game for first logon

Post by vtx »

A big guest is about simplicity and because internet is unreliable.

What happens when you are not alone to connect at the same time? There is no guarante the first to connect to the server will be the first to finish downloading the game!

Then you'll need an "ignition" command to let know that you have finished downloading the game and ready to start ( there is chance your command never reach the server ) or even if it reach it because of the above reason there is chance that you are not the first one and then back to square one having to do the "catching up" phase.

What to do with that "ignition" command did the server tell you that you are the first to connect and you have to send him the command, if it's the case only the "first to connect" will have authority to send that command and every other players will have to wait for you. ( adding another waiting phase time ) Worst you lost connection during download phase, all other players will never be able to play on the server. ( Sure you can say that everyone should send that command, pointless command when the server allready on )

You'll still end up with a catching up phase not matter what. ( it'll depend on the latency you have with the server hopefully under 10 ticks ).

The new network system (0.14) is built around the fact that the server is the only authority and have a pretty strong system against data loss. To simplify it "the server assume you never receive data unless you tell him you have received it, same for the client".

The catching up phase do the trick for all those kind of exception in a smoother way.

Recon777
Filter Inserter
Filter Inserter
Posts: 267
Joined: Fri Jun 10, 2016 4:04 am
Contact:

Re: Pause multiplayer game for first logon

Post by Recon777 »

None of that should matter if the server simply keeps the simulation paused until the first person is actually ready to play.

So "ignition" should be whoever is the first client which says "I'm fully loaded and ready to go".

In the scenario where you have two people simultaneously logging onto an empty server, it shouldn't matter who finishes loading first. Both would send the "I'm ready to go" signal. The server will receive the signal from at least one of them, prompting ignition or unpause, if I am interpreting your use of the word correctly.

At that point, with the game now unpaused, anyone who hasn't fully synced (loading or not) will have a very minor "catching up" phase to deal with the few seconds of playtime they didn't know they had missed.

Another option is to enforce serial loading. If someone requests to join the server, then the server could lock loading for that person only until they are fully in the game. This would create a queue scenario for large multiplayer servers, but shouldn't be noticed at all for everyone else. Enforcing serial loading would solve the scenario you mentioned quite well.

LGXerxes
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sat May 21, 2022 11:30 am
Contact:

Re: Pause multiplayer game for first logon

Post by LGXerxes »

Why is this still not a feature?
Loading Big file saves with high ups load is nearly impossible.

Luckly there is a new mod now where you can pause from command line with /pause & /unpause (https://mods.factorio.com/mod/pause-commands)

But I feel like if you are the first person to connect it should pause and wait for you

Post Reply

Return to “Ideas and Suggestions”