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
Large numbers of trains and signals cause low FPS #7767
Comments
Do you have a save file, screenshot, and/or dump file showing the low video FPS? Does it affect the game TPS (ticks per second)? Have you tried running with debug output enabled ( |
There is a performance monitor in the ?-Menu, can you make a screenshot of that? |
Please give more information about your system's hardware. Also, under which versions did it work fine, and when did the performance problems start? |
Thanks for your replies! I was out of the country, so i couldnt reply earlier. @James103 @Eddi-z @LordAro I can't remember when the problems started. I haven't played it for several months. The screenshot of the local game was from march this year. So far as i know, i didnt had any problems then. |
Oh, i forgot to mention this: With last multiplayer game, when i joined the game it was fine. In a few hours it went to unplayble. |
The game you took those screenshots probably has a very large number of trains, since the simulation of them takes more than 30 ms per tick. You may also be hitting the situation described in #7247, when there's sufficiently many vehicles the framerate-measurement code itself has an effect on the framerate. We have some ideas how to improve that particular issue but it's not ready yet. The difference between FPS and TPS is that FPS is how fast the screen is drawn, while TPS is how fast the game world is simulated. In your case, they're the same. Two points worth keeping in mind: OpenTTD does not benefit from a GPU, all graphics rendering is done in software. And OpenTTD is largely single-threaded, there is only very little benefit from multi-core CPUs. |
Hi @nielsmh That's exactly the strange thing. While in singeplayer 800 trains is a bit laggy but playable. In a multiplayer game there were less trains but unplayable. There were more players in the game (and other games where i encountered this) and they had no problems with lag. If there were too much trains, you would expect other players would have the same problems. |
In multiplayer, the framerate is always locked to the server's simulation rate, or perhaps even the slowest client's simulation rate. This is required due to the network game model used, there is no other way for all clients to stay in sync with the server other than everyone simulating everything, so everyone has to run at the same speed. |
sorry i dont understand what that has to do with a FPS of 2 in multiplayer game, when everybody else is running smooth. |
Still no solution? Maybe anyone has an idea to solve this? |
We don't know the cause yet. Are you able to get a savegame from the multiplayer server that causes this slowness, and load that save as a singleplayer game? |
Hello Niels, Yes i did, When i reloaded the savegame in singeplayer it was very good playable. Other players seem to have no problems continueing. Here some other information, maybe its usefull: I have savegames of about every year if you want to have them. Thanks in advance! |
If the same game plays fine in singleplayer mode, but is bad performance in multiplayer, then the cause is likely the network. The same amount of simulation is going on regardless of singleplayer or multiplayer, every client simulates everything. I'm not entirely sure and I hope someone else can chime in on this, but I think if you have a slow, high packet loss, or high latency, connection to the server, then that can disturb the network performance and cause your client to show this kind of symptoms. |
Network issues sound very logical. However with other games like World of Tanks or GTA5 I don't have any internet issues, while they will take more data than OpenTTD? Or can't those games be compared with this? I haven't changed anything with my Internet host, and since it has run smooth before, could an update provide these problems? Or maybe something like a firewall? The problems occured in a few (openttd) years. Could it be buffering? I shall try it with a laptop at home. If that runs smooth we can exclude some. |
As I mentioned earlier, the game is very sensitive to delays since the server and all clients need to run in sync. So large buffers causing delays somewhere on the network route to the server could be a possible reason, as could other contention or congestion. If you can try playing with the same computer on a different internet connection that could maybe shed some light on it. Or a different computer with the same internet connection. |
Don't think network issues can cause FPS drop like that. Usually when there are network issues UI stays responsive and FPS is fine, it's just the gameplay that starts lagging and if it gets too much client simply disconnects. But here it looks like client side simulation just takes way longer than it should. So I'd rather focus on how the game is ran. @BlackPlague666 are you sure you're running vanilla version from openttd.org not some patchpack or debug build? What command line options do you use (e.g. -d that can slow down the game)? Is there enough free RAM for the game to run without swapping? M.b. there is some other stuff on pc that can affect performance like idk hidden crypto miner? xD |
Hello Idpl, I only use updates from openttd.org. I usually update when i can't join vanilla cause of version difference. I don't use any command lines, I even don't know why I should. I don't have other software running, only AVG. Looking at my RAM (with ctrl-shift-esc) im seeing my RAM memory uses 5,22 gig of 8. Aint that a bit much? Its piling up, doenst go down anymore... |
@BlackPlague666 well, if there is a lot of stuff is in the game openttd can use quite some ram but as long as there is some free ram left it should be fine. So, just to be clear, is that 5 gig screenshot taken when the game is lagging? |
@ldpl I can remember that i rejoined after reopening openttd without improvement. Haven't tried rebooting. I will try sorting some stuff out. I got an other tip to delete my 850mb(!) of savegames. I will keep you updated. So far thanks for the help! |
Deleting savegames won't help, you can keep them. |
Thanks for this. There's been no activity on this for some time, and as it stands, it doesn't look likely that it will go any further. I'm closing it as we try to keep the issue count low for OpenTTD, it helps us focus on things that are important and fun. Feel free to discuss in irc or request re-opening if you disagree. Thanks for contributing! |
Version of OpenTTD
1.9.3
Sorry im new to this....
Since a few months i have terrible lag or low FPS while playing openttd.
It;s in singeplayer and online.
Today i had a Video FPS of 2. Unplayable.
My windows 7 seems to work fine, processor is not on his max.
I never had this before (last years).
The text was updated successfully, but these errors were encountered: