Very lag in OpenTTD

Got a problem with OpenTTD? Find some help here.

Moderator: OpenTTD Developers

Post Reply
User avatar
Abydos
Engineer
Engineer
Posts: 20
Joined: 18 Dec 2016 01:51
Location: Rio de Janeiro, Brazil

Very lag in OpenTTD

Post by Abydos »

I'm having a lot of lag when trying to play OpenTTD, either in version 1.8.0 or in previous versions. The game appears to be in slow motion, be it the sprites or the speed of music, with some spikes, either in the menu or in the game.

My specs:

Windows 7 SP1 64bit
Gigabyte GA-965P-DS3
Intel Core 2 Duo E4400 @ 2.0GHz
GeForce 9600GT 2GB
3GB DDR2 RAM
User avatar
Redirect Left
Tycoon
Tycoon
Posts: 7249
Joined: 22 Jan 2005 19:31
Location: Wakefield, West Yorkshire

Re: Very lag in OpenTTD

Post by Redirect Left »

OpenTTD, whilst being based on quite an old game, is a large CPU hog. This is especially true if you have a large amount of vehicles, as pathfinding needs to be done very frequently, and its a very CPU intensive process looking for all the possible routes, and which one is the best direction to go in at that precise point in time.

Does this happen all the time, or only on saved games after placing quite a lot of units?

I have a fairly modern Intel i5, 4x 3.5GHz and it still gets quite slow with large amounts of units. In part, because OpenTTD won't use more than one core (except in multiplayer, I believe OpenTTD dumps the net code into another core, if available?)
Image
Need some good tested AI? - Unofficial AI Tester, list of good stuff & thread is here.
User avatar
Abydos
Engineer
Engineer
Posts: 20
Joined: 18 Dec 2016 01:51
Location: Rio de Janeiro, Brazil

Re: Very lag in OpenTTD

Post by Abydos »

Redirect Left wrote:OpenTTD, whilst being based on quite an old game, is a large CPU hog. This is especially true if you have a large amount of vehicles, as pathfinding needs to be done very frequently, and its a very CPU intensive process looking for all the possible routes, and which one is the best direction to go in at that precise point in time.

Does this happen all the time, or only on saved games after placing quite a lot of units?

I have a fairly modern Intel i5, 4x 3.5GHz and it still gets quite slow with large amounts of units. In part, because OpenTTD won't use more than one core (except in multiplayer, I believe OpenTTD dumps the net code into another core, if available?)
This happens all the time. Actually I have specifications from a decade ago, but I find it odd that I can run current games like Kerbal Space Program at more than 60FPS and OpenTTD not.
User avatar
Redirect Left
Tycoon
Tycoon
Posts: 7249
Joined: 22 Jan 2005 19:31
Location: Wakefield, West Yorkshire

Re: Very lag in OpenTTD

Post by Redirect Left »

If you go to settings -> Full Animation, Full Details = off, does this improve the situation?
Image
Need some good tested AI? - Unofficial AI Tester, list of good stuff & thread is here.
User avatar
Abydos
Engineer
Engineer
Posts: 20
Joined: 18 Dec 2016 01:51
Location: Rio de Janeiro, Brazil

Re: Very lag in OpenTTD

Post by Abydos »

Redirect Left wrote:If you go to settings -> Full Animation, Full Details = off, does this improve the situation?
Yes, it improves. I tried reducing the screen resolution too, but it had no significant effect. At least now the game is playable, but far from the performance I had on a notebook with a 1.50GHz i3-2375M. Is it possible to do something more?
User avatar
Redirect Left
Tycoon
Tycoon
Posts: 7249
Joined: 22 Jan 2005 19:31
Location: Wakefield, West Yorkshire

Re: Very lag in OpenTTD

Post by Redirect Left »

You can try messing with the blitter options. As some hardware may struggle to render things in the original manner intended by Chris Sawyer when he made the game all those years ago. (Basically modern hardware deprecates stuff, or treats the stuff with very low priority, reducing overall performance with older methods) - the reverse is true, sometimes the cleverness of trying to get by these with new methods, may also have the opposite effect.

Details are on the Wiki here; https://wiki.openttd.org/FAQ_troublesho ... 5_or_later

The config file, i believe will be in C:\Users\SYSTEM_USERNAME\Documents\OpenTTD\ - at least mine is.

Other forum members will likely reply with potentially different options, the ones i have mentioned are from my experience. Indeed, changing the blitter optimised my framerate somewhat, obviously your mileage may vary.
Image
Need some good tested AI? - Unofficial AI Tester, list of good stuff & thread is here.
User avatar
kamnet
Moderator
Moderator
Posts: 8585
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: Very lag in OpenTTD

Post by kamnet »

Abydos wrote:Yes, it improves. I tried reducing the screen resolution too, but it had no significant effect. At least now the game is playable, but far from the performance I had on a notebook with a 1.50GHz i3-2375M. Is it possible to do something more?
Go back to your notebook? You moved from a faster processor to a slower one with slower bus speeds and a smaller cache. Switches and settings can only compensate for a hardware downgrade so much.
User avatar
Abydos
Engineer
Engineer
Posts: 20
Joined: 18 Dec 2016 01:51
Location: Rio de Janeiro, Brazil

Re: Very lag in OpenTTD

Post by Abydos »

Redirect Left wrote:You can try messing with the blitter options. As some hardware may struggle to render things in the original manner intended by Chris Sawyer when he made the game all those years ago. (Basically modern hardware deprecates stuff, or treats the stuff with very low priority, reducing overall performance with older methods) - the reverse is true, sometimes the cleverness of trying to get by these with new methods, may also have the opposite effect.

Details are on the Wiki here; https://wiki.openttd.org/FAQ_troublesho ... 5_or_later

The config file, i believe will be in C:\Users\SYSTEM_USERNAME\Documents\OpenTTD\ - at least mine is.

Other forum members will likely reply with potentially different options, the ones i have mentioned are from my experience. Indeed, changing the blitter optimised my framerate somewhat, obviously your mileage may vary.
It seems to have improved a bit after I did this.
kamnet wrote:Go back to your notebook? You moved from a faster processor to a slower one with slower bus speeds and a smaller cache. Switches and settings can only compensate for a hardware downgrade so much.
It does not pay. Although the hardware in my current computer is older, it is superior to my notebook, and caters better.
User avatar
kamnet
Moderator
Moderator
Posts: 8585
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: Very lag in OpenTTD

Post by kamnet »

You could probably get some better performance by using an older graphics card with dedicated 2D support in hardware rather than software. Using an SSD drive instead of a magnetic hard drive will help a little as well. If that isn't doable, using a ReadyBoost-enabled storage card (Compact Flash drive, USB drive, SD card) could also help a little.

Another idea worth trying: create another bootable hard drive partition, install a lightweight Linux distro and install OpenTTD on it. Windows is quite cumbersome, after all. :)
User avatar
acs121
Tycoon
Tycoon
Posts: 1957
Joined: 03 Nov 2017 18:57
Location: Courbevoie, near Paris, France

Re: Very lag in OpenTTD

Post by acs121 »

Are you using any NewGRFs ? If yes, show me your list.
User avatar
Pyoro
Tycoon
Tycoon
Posts: 2558
Joined: 17 Oct 2008 12:17
Location: Virgo Supercluster

Re: Very lag in OpenTTD

Post by Pyoro »

I'd wonder about map sizes, but if it happens even in the menu, I'm kinda more inclined to belief that some other trouble is going on. That shouldn't happen, even with less than stellar hardware.

What other programs do you have running while playing OTTD? Anything that could possibly be a culprit? Even if you don't think so, it might be worth trying to turn them off just to see. CPU aside, 3GB DDR3 RAM aren't much these days. Even a browser with a bunch of tabs open can make a dent in that. Also, check your Task Manager for anything that uses an usual amount of CPU/RAM and what your overall usage is while OTTD is open. You could also try increasing the priority for OTTD while it runs. It really shouldn't be necessary, but you could at least see if it matters.
User avatar
Abydos
Engineer
Engineer
Posts: 20
Joined: 18 Dec 2016 01:51
Location: Rio de Janeiro, Brazil

Re: Very lag in OpenTTD

Post by Abydos »

acs121 wrote:Are you using any NewGRFs ? If yes, show me your list.
I'm not using any NewGRF, only the game downloaded directly from the site. I already tried to reinstall the game too.
Pyoro wrote:I'd wonder about map sizes, but if it happens even in the menu, I'm kinda more inclined to belief that some other trouble is going on. That shouldn't happen, even with less than stellar hardware.

What other programs do you have running while playing OTTD? Anything that could possibly be a culprit? Even if you don't think so, it might be worth trying to turn them off just to see. CPU aside, 3GB DDR3 RAM aren't much these days. Even a browser with a bunch of tabs open can make a dent in that. Also, check your Task Manager for anything that uses an usual amount of CPU/RAM and what your overall usage is while OTTD is open. You could also try increasing the priority for OTTD while it runs. It really shouldn't be necessary, but you could at least see if it matters.
I have analyzed the performance of my computer as follows:

Idle: 10% CPU and 750MB RAM usage.
OpenTTD running at fullscreen 1920x1080 resolution, 256x256 map size and trees, with high priority: 40% CPU and 830MB RAM usage.
OpenTTD running at window mode 800x600 resolution, 256x256 map size and trees, with high priority: 10% CPU and 860MB RAM usage.

I closed unnecessary processes too. At resolution 800x600 with window mode, the game is almost completely playable.
User avatar
Abydos
Engineer
Engineer
Posts: 20
Joined: 18 Dec 2016 01:51
Location: Rio de Janeiro, Brazil

Re: Very lag in OpenTTD

Post by Abydos »

I was able to find a saved RAM memory and added it to my pc (now I have a total of 5GB of RAM) and OpenTTD is completely playable in my native resolution (1920x1080).
Post Reply

Return to “OpenTTD Problems”

Who is online

Users browsing this forum: No registered users and 9 guests