New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inexplicably low redraw rate on multiplayer server #8219
Comments
In a game I was playing with some friends of mine I was experiencing the same issues. |
Server performance defining simulation speed is nothing new and totally expected but I doubt that's the case for Reddit servers. Also it seems that for some reason server is affecting rendering performance of clients in some cases which shouldn't really happen: https://www.reddit.com/r/openttd/comments/hg9pbt/can_something_be_done_to_avoid_poor_performance/ |
When a network game is catching up with the server, it goes into a "fast" loop where drawing isn't given any time to happen. The best thing I can think off, looking at the info you give, is that this is happening:
This is far from ideal of course, but the problem is hard to solve. When the game-loop takes close to 30ms, all kind of weird stuff starts to happen on multiplayer games. I am not sure that there is a correct solution. I do how-ever want to prevent this "blocking" of the interface a bit more, and maybe show a message, how-ever short, that this happened. I dunno yet .. But, more importantly, do you recognize this scenario? Could this be your case, you think? Or am I wildly off? |
Closed based on IRC discussion. When the client can't maintain normal speed in a single-player game, the game-loop and drawing simply run a bit slower; the UI may become slightly less responsive but there's no step-change in responsiveness and the FPS is generally consistent even if low. In multiplayer, the game-loop can't be allowed to drop behind the server else the client would desync. As @TrueBrain described, the client catches up by skipping drawing on some ticks and running only the simulation: https://github.com/OpenTTD/OpenTTD/blob/master/src/network/network.cpp#L997 This causes irregular groups of dropped frames rather than the smooth performance degradation seen in single-player. In the worst case the client can barely keep up with only the simulation without being desynced, so drawing may happen very intermittently or even not at all for some periods. That appears to be the case here. Usability could be improved by showing a notice when drawing is skipped, or even by disconnecting from the server if drawing has to be skipped for many frames in some time period. The game probably can't be made playable in this case. |
In other words: Your computer is too slow to play a game of that size in multiplayer. |
That's the very short explanation, yes. I filed a bug because the effects of being "too slow" in multiplayer are completely different and much more user-hostile than in single-player [for the reasons above], and that was unexpected to me. |
Version of OpenTTD
1.10.2
Expected result
When looking at an empty section of grass in a relatively empty server, the game renders at the normal rate.
Actual result
The drawing and video output rates are about 1.7fps, with frequent multi-second hangs, making the game unplayable.
Note that the actual times, in ms, look fine AIUI.
Output of
fps
:Steps to reproduce
This does not occur with local games (there's lag with a ton of vehicles etc., but that's normal).
EDIT: This also occurred with 1.10.1. It didn't with 1.9.x.
The text was updated successfully, but these errors were encountered: