Multi-core support please!
Moderator: OpenTTD Developers
Re: Multi-core support please!
Openttd has a huge performance improvement that you are forgetting or disregarding in your equation. On top of that you forget/disregard/aren't aware of the memory bandwidth required by openttd.
If you want to make openttd happy with a huge, busy map, make sure you have fast memory and a huge L1 and L2 cache on a very good and fast mainboard. Openttd handles LOTS of data every second.
In my knowledge there's no game that comes even close to what openttd could be made to cope with. Openttd cannot make any assumptions about a game being played. Behavior and art assets can be modified completely (ok, you can't turn openttd into an fps or a platformer) before the game is started by the player, in optionally a huge completely random world, which can be edited completely during play.
If you want to make openttd happy with a huge, busy map, make sure you have fast memory and a huge L1 and L2 cache on a very good and fast mainboard. Openttd handles LOTS of data every second.
In my knowledge there's no game that comes even close to what openttd could be made to cope with. Openttd cannot make any assumptions about a game being played. Behavior and art assets can be modified completely (ok, you can't turn openttd into an fps or a platformer) before the game is started by the player, in optionally a huge completely random world, which can be edited completely during play.
Last edited by Expresso on 28 Jul 2015 21:11, edited 1 time in total.
Re: Multi-core support please!
Which of course is total bulls***.Mister_X wrote:Since the original game, a lot of game limits are improved. [...]
The maximum number of vehicles are increased from 500 to 20.000.
Number of network players are increased to 15 and all traffic is fully synchronized.
The most improvements will cost more CPU power. For example, we could use 15 x 20.000 = 300.000 vehicles in one map and that's 6000 times more than the 500 vehicles in the original version.
For the original version, we needed 60 MHz for 500 vehicles. So for 300.000 vehicles, we need at least a CPU speed of 60x6000 = 360.000 MHz = 360 GHz !
Firstly there is a sea of difference in performance between the 32 bits 486 and a modern 64 bits i7. The CPU clock speed is only one of several dimensions. The amount of stuff that can be cached in RAM is also vastly different from when we typically had 4 MB of it and everything above had to be swapped back and forth to the HDD.
Secondly, and probably even more important: How do you manage 20.000 vehicles? And how do even 15 of you manage to cram 300.000 vehicles into one map?
Re: Multi-core support please!
btw. "clock speeds" today are more like marketing numbers and have basically nothing to do with at which speed your CPU actually runs.
Re: Multi-core support please!
On a map of 4096x8192 (maximum mapsize) = 33554432 (number of tiles on a map of that size) / 300000 (number of vehicles) = 111 (number of tiles for one vehicle). So, there is actually space on the map.leifbk wrote:And how do even 15 of you manage to cram 300.000 vehicles into one map?
However, I guess it would be safe to assume that openttd would be unplayable on even multi-core cpus, if it used multiple cores, with that many vehicles, simply because of memory bandwidth issues.
Re: Multi-core support please!
Yeah, that would even leave some space for towns and industriesExpresso wrote:On a map of 4096x8192 (maximum mapsize) = 33554432 (number of tiles on a map of that size) / 300000 (number of vehicles) = 111 (number of tiles for one vehicle). So, there is actually space on the map.

I wasn't really thinking about space on the map, but how you would go about with the sheer work of deploying all those vehicles in a limited amount of time, and then manage them in a meaningful way. I'm an elderly guy and play a game to relax, not to buzz around like a hamster on amphetamine.
Indeed.However, I guess it would be safe to assume that openttd would be unplayable on even multi-core cpus, if it used multiple cores, with that many vehicles, simply because of memory bandwidth issues.
- TimeLapse1357
- Traffic Manager
- Posts: 132
- Joined: 10 Mar 2015 07:13
- Location: Southern California
Re: Multi-core support please!
SimCity4 Rush Hour.Expresso wrote:In my knowledge there's no game that comes even close to what openttd could be made to cope with.
most laptops and 'on motherboard' video systems use shared memory. the video chip and the CPU cannot access memory at the same time. reduces frame rate and slows performance.
the advantage of multi-core/hyper-threading is being able to run the game AND WinAmp, Excel, Paint, IE/firefox(multiple tabs) and custom .NET APPs, all at the same time.
-
- Tycoon
- Posts: 2792
- Joined: 22 Feb 2011 18:34
Re: Multi-core support please!
I wish you good luck with cramming 300.000 vehicles in a map that still makes some sense from a play-wise perspective...Mister_X wrote:For the original version, we needed 60 MHz for 500 vehicles. So for 300.000 vehicles, we need at least a CPU speed of 60x6000 = 360.000 MHz = 360 GHz !
This calculation is a little but overstated of course, but I want to explain here that due to all improvements now and in the future the game needs more and more CPU speed to run this game.
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML
Re: Multi-core support please!
My calculation with extreme values was only to show you that the game limits are increased an won't run anymore at slow computers.
I've given up a lot of multiplayer games because the performance of the game was too bad with a huge number of trains (4 players with about 1.800 trains each).
OpenTTD is consuming 25% of my quad core CPU running at 2.7 GHz so a full core is used for OpenTTD and it's displaying 1fps. Making the screen smaller will reduce the CPU usage a little bit, but I've 3 cores left to do something else.
I've given up a lot of multiplayer games because the performance of the game was too bad with a huge number of trains (4 players with about 1.800 trains each).
OpenTTD is consuming 25% of my quad core CPU running at 2.7 GHz so a full core is used for OpenTTD and it's displaying 1fps. Making the screen smaller will reduce the CPU usage a little bit, but I've 3 cores left to do something else.
Re: Multi-core support please!
the thing with multiple cores is... it won't make it multiple times faster.
there have been experiments with multithreading in openttd, which resulted in something around: on dualcore computers it gets 20% faster, on singlecore computers it gets 20% slower. you're better off with the builtin feature of most multicore processors that can overclock one processor when the others are idle.
and maintainability goes down the drain... desync debugging is already hard enough.
there have been experiments with multithreading in openttd, which resulted in something around: on dualcore computers it gets 20% faster, on singlecore computers it gets 20% slower. you're better off with the builtin feature of most multicore processors that can overclock one processor when the others are idle.
and maintainability goes down the drain... desync debugging is already hard enough.
Re: Multi-core support please!
Built-in card = hardware video card. AFAIK the problem is, that OpenTTD does not use graphics hardware acceleration (computing video on built-in card), because the graphics framework (sdl1.2) does not support it. To increase performance, OpenTTD graphics layer needs to be upgraded to sdl2.kamnet wrote:From what I've read in recent discussions, the bottleneck is not the single core processing, but the fact that video driver support has moved from hardware to software. Your newest PC likely has a built-in video card with mostly software driving the video, where your PC from 10 years ago had all of that working on a separate hardware video card.
Re: Multi-core support please!
Are you volunteering?Roslav wrote:Built-in card = hardware video card. AFAIK the problem is, that OpenTTD does not use graphics hardware acceleration (computing video on built-in card), because the graphics framework (sdl1.2) does not support it. To increase performance, OpenTTD graphics layer needs to be upgraded to sdl2.

-
- Tycoon
- Posts: 1397
- Joined: 23 Feb 2014 22:02
Re: Multi-core support please!
Since I installed my video card my monitor has been plugged into it.Are you saying OpenTTD somehow ignores the GPU?
Re: Multi-core support please!
Yep, OpenTTD sees video cards as dumb "display my generated pixels" devices.
More modern games,, in particular all 3D-ish games see video cards as "convert my spatial collection of surfaces to the display". The GPU does a lot of 3D calculations in the latter case in dedicated hardware, much faster than a CPU can do it.
More modern games,, in particular all 3D-ish games see video cards as "convert my spatial collection of surfaces to the display". The GPU does a lot of 3D calculations in the latter case in dedicated hardware, much faster than a CPU can do it.
Being a retired OpenTTD developer does not mean I know what I am doing.
-
- Tycoon
- Posts: 1397
- Joined: 23 Feb 2014 22:02
Re: Multi-core support please!
So would adding GPU support improve OpenTTD performance more than adding multi-core CPU support?
Re: Multi-core support please!
no.
because OpenTTD doesn't do any fancy 3D stuff. and the stuff that OpenTTD does do, GPUs are not optimized for.
because OpenTTD doesn't do any fancy 3D stuff. and the stuff that OpenTTD does do, GPUs are not optimized for.
-
- Tycoon
- Posts: 1397
- Joined: 23 Feb 2014 22:02
Re: Multi-core support please!
So if additional cores are ignored and GPUs are ignored and clock rates aren't "real"...what hardware improvements DO affect OpenTTD performance?
Re: Multi-core support please!
they are not ignored, but none of the existing features are likely to be ever recoded to make use of them in a meaningful way (new features like CargoDist do use them)Baldy's Boss wrote:So if additional cores are ignored
there's the unit of "MIPS" [million instructions per second], which is sort of relevant, but it's nearly impossible to compare this value between computers of different architectures.and clock rates aren't "real"...
but even between "not real" clock speeds, a higher number usually means better performance. but there's probably no point in comparing this number between, say, AMD and Intel processors.
Re: Multi-core support please!
CPU speed is certainly "real", but it's only one of several dimensions. I haven't been into current computer architecture for many years, but parameters like memory speed, cache size, bus speed, and number of memory channels certainly count.
I have built my own computers for 15 years, and I still consider my 5 year old rig with an i7 Quad running at 2.8 GHz / 6 GB RAM as adequate. But I'm seriously considering a CPU/Mobo/RAM upgrade soon, - because the components are aging and may be expected to go flaky sooner or later. My disks (2x1 TB in RAID-1 for the system, 4x2 TB in RAID-5 for /home) are 3 years old and probably will suffice for another couple of years. And yes, I'm running other things beside OpenTTD
My graphics card is rather low-end, a fanless ASUS GeForce GT 640 which does a very decent job of throwing pixels at my 2560x1440 32 inch screen. But then, I'm not into any fancy 3D games and stuff. It works fine for both HD movies and my regular text work.
I have built my own computers for 15 years, and I still consider my 5 year old rig with an i7 Quad running at 2.8 GHz / 6 GB RAM as adequate. But I'm seriously considering a CPU/Mobo/RAM upgrade soon, - because the components are aging and may be expected to go flaky sooner or later. My disks (2x1 TB in RAID-1 for the system, 4x2 TB in RAID-5 for /home) are 3 years old and probably will suffice for another couple of years. And yes, I'm running other things beside OpenTTD

My graphics card is rather low-end, a fanless ASUS GeForce GT 640 which does a very decent job of throwing pixels at my 2560x1440 32 inch screen. But then, I'm not into any fancy 3D games and stuff. It works fine for both HD movies and my regular text work.
-
- Tycoon
- Posts: 1397
- Joined: 23 Feb 2014 22:02
Re: Multi-core support please!
I have an i7-3770K (3.5GHz base) with 8 MB of RAM (was supposed to be 16MB but the motherboard seems to only see one of the two modules) and 2 4-TB drives plus a 240GB SSD.My graphics card is a Radeon HD 7770 model from ASUS.
I previously played OpenTTD on a Dell Poweredge 2650 with 4GB RAM and a 3.06GHz Xeon (32-bit,twin-thread core) and Transport Tycoon in DOSBox on a Compaq 6350US with a 2.4GHz Pentium 4 with 512MB RAM,having started playing TT on a AMD 486 DX4-120 with 32MB.
I'm getting the picture that OTTD would play just as well on just about any CPU still sold as on what I've got?
I previously played OpenTTD on a Dell Poweredge 2650 with 4GB RAM and a 3.06GHz Xeon (32-bit,twin-thread core) and Transport Tycoon in DOSBox on a Compaq 6350US with a 2.4GHz Pentium 4 with 512MB RAM,having started playing TT on a AMD 486 DX4-120 with 32MB.
I'm getting the picture that OTTD would play just as well on just about any CPU still sold as on what I've got?
- Redirect Left
- Tycoon
- Posts: 7425
- Joined: 22 Jan 2005 19:31
- Location: Wakefield, West Yorkshire
Re: Multi-core support please!
You may wish to revise that line. Otherwise it's a miracle you have a modern operating system and are able to browse the internet.Baldy's Boss wrote:8 MB of RAM (was supposed to be 16MB but the motherboard seems to only see one of the two modules)
Who is online
Users browsing this forum: No registered users and 8 guests