jfs wrote: 18 Mar 2025 13:55
It's worth keeping in mind that for OpenTTD multiplayer, it's risky to have the server be better specced than the players. In general, OpenTTD servers will run the game at the speed they can (up to full speed), but if any clients can't keep up because the map is too large, they will fall behind on simulation speed, and
the server will not wait for them. Slow clients will end up getting kicked off the server for being too slow.
For that reason, it can actually be advantageous to have the server for OpenTTD games be a slow computer. Then the game will just run equally slow for everyone.
Oh yeah, and do keep in mind that the savegame data for a 4k map can easily begin at 30 MB for a fresh world, and go well beyond 50 or even 100 MB for a world that has been built up. Any time a new client connects, they need to transfer the entire game.
Interesting. I always forget about this even though it used to happen to me all the time back when all my computers had low-end pre-Ryzen AMD APUs that were about as unideal for OpenTTD as seems to be possible.
This makes me wonder if a better way to handle this is server-side-only simulation with client-side prediction, like how Luanti/Minetest handles multiplayer. However, I'd imagine that, in addition to the massive changes to the codebase that this would take, this would run into the same issue as multithreading: namely, that the game state is so massive and complex that transferring it would take an obscene amount of bandwidth. To remedy this we would need some at least fairly accurate way of predicting whether part or all of the client sim was out of date, which would probably have to be client-side and thus eat up a sizeable amount of system resources. Even if it could be put on a separate thread (unlikely), it would probably just slow the game further, making it no improvement for the client.
Perhaps, then, it would be simpler to just add an option to throttle the server sim rate if a client is out of date, although I suspect this has its own problems. It would have the added benefit of being backwards-compatible.
Yet Another PathFinder has become The Only PathFinder. What the effect of the change from YAPF to TOPF is, only time will tell.