Page 1 of 1

Weird client FPS behaviour

Posted: Sat Feb 20, 2021 7:21 pm
by KillerAnt
I have the following issue playing with a friend, who is hosting our multiplayer game. UPS are about 50, his FPS are the same as the UPS.

I am for the last two or three hours just letting my game run and looking at the FPS because often it is unplayable. He is telling me what he is doing, and it seems whenever he is in the map view, my (client) FPS are 40+, when he is in the normal view, they drop to unplayable 4.5 FPS.

How can my FPS depend on whether he is in the map view or in the normal view? The game simulation should still run the same, no matter what.

Re: Weird client FPS behaviour

Posted: Sun Feb 21, 2021 6:38 pm
by KillerAnt
We tried it out today - If he just lets the game run and goes to dinner, without going into map mode, my game runs at 4.0 fps and disconnects after some time because it can't keep up. If he goes into map mode before leaving the PC, I have no problem playing on while he is away.

Re: Weird client FPS behaviour

Posted: Sun Feb 21, 2021 8:23 pm
by nuhll
try to swap host.

I cant remember how it was, but the server has to be faster or slower as the client in order to keep up.

Re: Weird client FPS behaviour

Posted: Wed Feb 24, 2021 8:50 pm
by KillerAnt
It may or may not have worked, we do not have the same problem the other way around.
Still, isn't it weird that it works when he is in map mode?
My FPS have a factor 10 between him being in map mode and normal mode. That isn't something I can wrap my head around, despite being a software developer myself.

Re: Weird client FPS behaviour

Posted: Thu Feb 25, 2021 7:23 pm
by ptx0
KillerAnt wrote:
Wed Feb 24, 2021 8:50 pm
It may or may not have worked, we do not have the same problem the other way around.
Still, isn't it weird that it works when he is in map mode?
My FPS have a factor 10 between him being in map mode and normal mode. That isn't something I can wrap my head around, despite being a software developer myself.
can you run the game inside a profiler like perf on Linux or (assuming, tbh) VSCode on Windows?

Re: Weird client FPS behaviour

Posted: Thu Feb 25, 2021 8:30 pm
by KillerAnt
VSCode as a profiler? Learning something new every day.

I may be able to do so on the weekend. Which profilers (e.g. from this long list) do you think are most suited for the kind of profiling you think of?

Re: Weird client FPS behaviour

Posted: Thu Feb 25, 2021 9:29 pm
by ptx0
KillerAnt wrote:
Thu Feb 25, 2021 8:30 pm
VSCode as a profiler? Learning something new every day.

I may be able to do so on the weekend. Which profilers (e.g. from this long list) do you think are most suited for the kind of profiling you think of?
I'm a Linux dev, not a Windows user - can't answer that question. I'd boot into a Live USB for Linux and run the factorio.com binary.

Re: Weird client FPS behaviour

Posted: Fri Mar 12, 2021 3:14 am
by nuhll
if you google around that forum here ive read the explaination a dozen times, but i just remembered that you swap and it works, it has to do with that everyone needs to do the same calculations at every point in time. And i think the fastest shouldnt be the host, but that might be just wrong remembered.

Re: Weird client FPS behaviour

Posted: Fri Mar 12, 2021 7:24 pm
by KillerAnt
Then why does it work when the host is in map mode? What is so different about map mode that currently I have 32.5 fps when he is in map mode, but only 2.5 FPS when he isn't?

Re: Weird client FPS behaviour

Posted: Sun Mar 14, 2021 12:48 am
by nuhll
probably gpu constrained?

Re: Weird client FPS behaviour

Posted: Sun Mar 14, 2021 1:06 am
by orzelek
Grab GPU-Z and launch it on host.
Might show some data about whats going on - depends on GPU in use.

You should check GPU usage % and how much memory is in use. Those might show if something is maxed out and slowing down the rest of processing.

Re: Weird client FPS behaviour

Posted: Sun Mar 14, 2021 2:06 pm
by ptx0
KillerAnt wrote:
Fri Mar 12, 2021 7:24 pm
Then why does it work when the host is in map mode? What is so different about map mode that currently I have 32.5 fps when he is in map mode, but only 2.5 FPS when he isn't?
no one can answer that until you profile your savegame during the problem and after.

orzelek is onto something with VRAM suggestion, I think.