Open TTD running speed

Got a problem with OpenTTD? Find some help here.

Moderator: OpenTTD Developers

Post Reply
gunner71
Engineer
Engineer
Posts: 8
Joined: 19 Sep 2015 15:04

Open TTD running speed

Post by gunner71 »

I've recently started playing Open TTD after a long break, and am loving the larger size maps you can now generate, but in my epic attempt to recreate the UK in my game, I've noticed that as the time has gone on, the game is running so sluggish and slow on my laptop as to make it almost unplayable. Any advice on how to get around this. I'm aware that AI scripts slow down things, and I've also read that ships can be a problem too, but I like to use to both of these two things!
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: Open TTD running speed

Post by Alberth »

Buy a faster computer, in particular fast in single core, and with a lot of bandwidth between CPU and video
Being a retired OpenTTD developer does not mean I know what I am doing.
gunner71
Engineer
Engineer
Posts: 8
Joined: 19 Sep 2015 15:04

Re: Open TTD running speed

Post by gunner71 »

Alberth wrote:Buy a faster computer, in particular fast in single core, and with a lot of bandwidth between CPU and video

Yeah, that did occur to me Alberth, but unfortunately, the money to buy a new computer is not something I have :(
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 4001
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: Open TTD running speed

Post by NekoMaster »

gunner71 wrote:
Alberth wrote:Buy a faster computer, in particular fast in single core, and with a lot of bandwidth between CPU and video

Yeah, that did occur to me Alberth, but unfortunately, the money to buy a new computer is not something I have :(
Another thing that might help is playing it on a light weight operating system. I did notice on older computers back in high school that OpenTTD ran a little faster on the same computer when using a light weight linux OS (which I usually booted off a memory stick at school or installed to one of my own computers)
Image Proud Canadian Image
Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
gunner71
Engineer
Engineer
Posts: 8
Joined: 19 Sep 2015 15:04

Re: Open TTD running speed

Post by gunner71 »

Thanks NekoMaster

I'm not that hot on how operating systems work, my laptop is 5 yrs old now, was top of the range at the time I bought it, and can run quite heavy graphical games like Skyrim and GTA, but open TTD seems to be a problem for it
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: Open TTD running speed

Post by Alberth »

Disable 'full animation' and disable 'full details' might solve a bit.
Disabling the 4x and 2x zoom in the settings might help (bigger sprites are then not loaded into the cache).

As for other games, they use the computer in a different way, in particular they use the GPU. OpenTTD uses the computer like was normal 20 years ago. Modern computers don't like that any more.
Being a retired OpenTTD developer does not mean I know what I am doing.
User avatar
Pilot
General Forums Moderator
General Forums Moderator
Posts: 7629
Joined: 04 Aug 2010 15:48

Re: Open TTD running speed

Post by Pilot »

Alberth wrote:As for other games, they use the computer in a different way, in particular they use the GPU. OpenTTD uses the computer like was normal 20 years ago. Modern computers don't like that any more.
Just out of interest, is there a simple way to make OTTD use the computer "in a different way", more fitting to modern PCs, or is this a massive undertaking that would require a lot of work on the part of the development team?
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: Open TTD running speed

Post by Alberth »

Pilot wrote:Just out of interest, is there a simple way to make OTTD use the computer "in a different way", more fitting to modern PCs, or is this a massive undertaking that would require a lot of work on the part of the development team?
Modern computers render graphics with the GPU instead of the CPU.

As far as I know, an attempt has been tried and it failed, so "simple" can be safely ruled out, I think.


Pondering about, likely one of the core problems is that newgrfs decide a lot wrt graphics, you need to consult them while rendering their graphics. That leads to
a) Keep NewGRF evaluation at the CPU, and draw at the GPU, or
b) Move NewGRF evaluation to the GPU as well, and compute and render there.

Option a should be relative simple (for as far as it can be called 'simple'), but it means you constantly need to push results to the GPU, which results in little gains in speed if any (GPUs want to draw massive amounts of tringles in one call, rather than each triangle separately).
Option b is very non trivial. Not only do you need to interpret the compiled GRF code in the GPU, you also need to copy much of the game state (sort of the complete map with everything on it) onto the GPU. It may imply that effectively you are running OpenTTD at the GPU (there is very little left after you moved NewGRFs and game state to the GPU). That's not a new video back-end, it's a complete port to a massive parallel processor, while current OpenTTD is very much single core oriented (the game may look parallizable from the outside, but it's not).

I think this explains why we're still rendering with the CPU. Option a is a lot of effort and making things complicated without gain, option b is not even feasible.

Other not-quite-feasible options are to drop parts of the NewGRF spec, for example, to make it easier to render graphics without NewGRF assitance. Lots of NewGRFs would probably die, so not a good direction either.
Being a retired OpenTTD developer does not mean I know what I am doing.
gunner71
Engineer
Engineer
Posts: 8
Joined: 19 Sep 2015 15:04

Re: Open TTD running speed

Post by gunner71 »

Alberth wrote:Disable 'full animation' and disable 'full details' might solve a bit.
Disabling the 4x and 2x zoom in the settings might help (bigger sprites are then not loaded into the cache).

As for other games, they use the computer in a different way, in particular they use the GPU. OpenTTD uses the computer like was normal 20 years ago. Modern computers don't like that any more.
Thanks Alberth, I will try disabling these settings
Post Reply

Return to “OpenTTD Problems”

Who is online

Users browsing this forum: No registered users and 36 guests