Mysterious Lag (can't be avoided?)
Moderator: OpenTTD Developers
Mysterious Lag (can't be avoided?)
This is a question to the devs and a query to the other players to see if they see the same issues I have been seeing.
It seems the threading on the game needs a close look. I've tested this "phenomenon" a half dozen times now and come up with the same lag problem.
I play on a 10x10 map, nothing fancy, about 20 towns, no major industry, no super complex rail junctions and on my latest game only 29 trains and 24 road vehicles.
Yet, there's a consistant lag/freeze in the game every second or so. This only seem to appear in the late 2000's by game year. My processor never goes above 30% usage...
Now my system should be MORE than capable of powering this setup...
I have a 3.2 Ghz with 1 gig of ram and a Ge Force 6800 GT video card with 256 meg ram on it. Yet I can't get rid of this lag.
Also I find that turning off Autosave actually doesn't do anything, it still autosaves at the beginning of every month.
Anyway, I'd like to hear some theories and feedback on the lag.
-Nick
It seems the threading on the game needs a close look. I've tested this "phenomenon" a half dozen times now and come up with the same lag problem.
I play on a 10x10 map, nothing fancy, about 20 towns, no major industry, no super complex rail junctions and on my latest game only 29 trains and 24 road vehicles.
Yet, there's a consistant lag/freeze in the game every second or so. This only seem to appear in the late 2000's by game year. My processor never goes above 30% usage...
Now my system should be MORE than capable of powering this setup...
I have a 3.2 Ghz with 1 gig of ram and a Ge Force 6800 GT video card with 256 meg ram on it. Yet I can't get rid of this lag.
Also I find that turning off Autosave actually doesn't do anything, it still autosaves at the beginning of every month.
Anyway, I'd like to hear some theories and feedback on the lag.
-Nick
-Buggi
Programmer and TTD fan...
Programmer and TTD fan...
There is no threading in OTTD, it's all one single loop 
Clearly the game was NOT designed for anything bigger than 256x256. If for example you have a TON of towns and they get processed every day, the game would lag every day (every 2-3 seconds) to get this done.
We've done the easiest step by just allowing you to create more and bigger things. The even harder part is to get the game out of these 'design limitations' and 'performance issues' that only surface wit these huge maps and numbers, which as said before were not designed during the creation of TTDLX.

Clearly the game was NOT designed for anything bigger than 256x256. If for example you have a TON of towns and they get processed every day, the game would lag every day (every 2-3 seconds) to get this done.
We've done the easiest step by just allowing you to create more and bigger things. The even harder part is to get the game out of these 'design limitations' and 'performance issues' that only surface wit these huge maps and numbers, which as said before were not designed during the creation of TTDLX.
TrueLight: "Did you bother to read any of the replies, or you just pressed 'Reply' and started typing?"
<@[R-Dk]FoRbiDDeN> "HELP, this litte arrow thing keeps following my mouse, and I can't make it go away."
<@[R-Dk]FoRbiDDeN> "HELP, this litte arrow thing keeps following my mouse, and I can't make it go away."
Acctaly, on your server machine.
Reduce your screen to 16bit 640x480. And see if that dosent help.
If your useing windows 2000/xp then you might wanna visit
For 2000 - http://www.blackviper.com/WIN2K/servicecfg.htm
And XP - http://www.blackviper.com/WinXP/servicecfg.htm
If gives you a description of windows services and which ones you can disbable.
If your useing xp, then that may be the problem, as xp aint really made for being a server as 2000 or linux would be.
http://ttd.redgoldcreations.com/
My server runs the bare minimal, and most people say that they dont get any lag. Even well past 2000. No lag what so ever. Even for me on a remote computer.
* most these high end computers now adays, aint all there cracked up to be
*
Reduce your screen to 16bit 640x480. And see if that dosent help.
If your useing windows 2000/xp then you might wanna visit
For 2000 - http://www.blackviper.com/WIN2K/servicecfg.htm
And XP - http://www.blackviper.com/WinXP/servicecfg.htm
If gives you a description of windows services and which ones you can disbable.
If your useing xp, then that may be the problem, as xp aint really made for being a server as 2000 or linux would be.
http://ttd.redgoldcreations.com/
My server runs the bare minimal, and most people say that they dont get any lag. Even well past 2000. No lag what so ever. Even for me on a remote computer.
* most these high end computers now adays, aint all there cracked up to be

It could have been my 6 or so 20x20 train stations...
I took the max size to 10 and it seems to be helping the lag issue... although I need twice the trains 
What causes large stations to slow down the game anyway?
Also, why the 4,095 cap on goods at a station? What processes loading of trains? I looked for a VERY long time for this and couldn't find it...
Sometimes I'll have one or more trains sitting at a station that's maxed at 4095 and nothing is getting loaded for many many days... It's annoying.


What causes large stations to slow down the game anyway?
Also, why the 4,095 cap on goods at a station? What processes loading of trains? I looked for a VERY long time for this and couldn't find it...

Sometimes I'll have one or more trains sitting at a station that's maxed at 4095 and nothing is getting loaded for many many days... It's annoying.
-Buggi
Programmer and TTD fan...
Programmer and TTD fan...
- LordOfThePigs
- Route Supervisor
- Posts: 435
- Joined: 01 Jul 2004 10:28
- Location: Jura/Switzerland
While I haven't really looked at tha particular part of the code, this looks suspiciously like they store the waiting cargo on 12 bits (2^12 = 4096) and use the remaing 4 to store some more information about this particular cargo.Buggi wrote:Also, why the 4,095 cap on goods at a station?
I could be wrong, but the symptoms point to the very common OTTD "designed for TTDX" things...
Sometimes I'm told "Brilliant"...
Sometimes I'm told "Charming"...
And Often I'm told "Shut Up"!
Sometimes I'm told "Charming"...
And Often I'm told "Shut Up"!
I also noticed the game can run VERY sloppy on a 10x10 map, in my case I have well over 500 trains running.
I found the problem to be in the PATHFINDING of the trains, as soon as theres a jam/holdup somewhere, the game wil start to jerk and generally become unplayable. As soon as the jam/holdup is solved, it runs smooth again:)
I found the problem to be in the PATHFINDING of the trains, as soon as theres a jam/holdup somewhere, the game wil start to jerk and generally become unplayable. As soon as the jam/holdup is solved, it runs smooth again:)
Who is online
Users browsing this forum: No registered users and 10 guests