FooBar wrote:For most players there's no gain in multicore anyways, as the game runs perfectly fine as it is.
Beg to differ.
OpenTTD is being ported to mobile devices.
any mobile device, or netbook (powered by an AMD C or Intel Atom processor), does not have sufficient power to run the any game larger than 128x128 on a single core.
Meaning, as time progresses, and more vehicles are running/flying/floating on the screen, the CPU has a hard time keeping up.
Most Mobile devices like android phones, cheap chinese tablets, and the Raspberry Pi still have but an 800Mhz per thread core.
Raspberry Pi only has one core(what you'd expect for a $35 computer).
Most mobile phones, netbooks and normal tablets are dual thread compatible, meaning a single processor having two cores. Most of them have a 1,2Ghz cpu, dual threaded, and most modern netbooks and tablets and phones are getting to be equipped with slower in speed, but higher in core count, 1Ghz quadcore cpu's.
Currently netbooks are dual processor, dual cores, intel's with Hyperthreading, meaning most intel netbooks sold today already support upto 4 threads at a time, at a speed anywhere between 800Mhz, to 1,4Ghz (intel atom rating is 1,6-1,83Ghz).
I just plan to place some facts here, along with some boring terminology, so forgive me if I elaborate a bit (mostly on an intel atom 1,6Ghz core, as I have most experience with these):
In this case, a processor consists of 2 cores, the primary core, and the secondary, which is the hyper threading core (although names like 'cores' and 'processors' are often intertwined, a processor is a hardware unit, a core is the part that processes a single thread; a processor can have 2 or 4 cores, when they have hyperthreading, it is not exactly an extra core, but at least can be seen as an extension to the core to perform a secondary thread at a lower performace. Because of all the terminology, if a computer has 2 units, with hyperthreading, I will refer to them as 4 cores even if it only has 2, because it can process 4 threads at a time, and so far I'm ashamed to say, I don't really know the correct name of the extension of the primary core, known as the hyperthreading part '?core?').
If an Intel atom processor is rated @1,6Ghz, it performs like a 1,2Ghz desktop cpu at best on a single thread. Since it has HyperThreading, each core will seldom see a 100% utilization on a multi threaded app. Instead of letting each core (of the dual core cpu) process 1 thread, there will be times when windows lets only one core do all the work, part through the primary core, part through the secondary part of the core, the hyperthreading core.
If one core is processing a single thread, it's anywhere between 1 and 1,2Ghz (roughly speaking; let's say 1,2Ghz at best).
If 2 of the primary cores on the Intel atom processor would work simultaneously, the processor would perform like a single core 2,4Ghz desktop processor.
If one core is processing the threads, while the second core is idle, the total speed would be 1,6Ghz at best (that is when the threads are optimized to the core's performance, the 1,2Ghz that the primary core can do, and whatever extra the hyperthreading core can squeeze out of the first core).
If the primary core is processing one thread, while the secondary hyperthreading core is processing the second thread (in case the second processor's primary core already doing something) you'd get similar results, 1,6Ghz at best.
If the hyperthreading core is the sole part processing one stream of data, while the main core is actively doing something else (like virus scan or something other), then the Intel Atom performs like a 400Mhz cpu at worst.
If both primary cores are 100% active, and dual threads are ran off the hyperthreading cores, you'd see a speed anywhere around 400-800Mhz
So, depending on the game, if it has only one thread, depending on the thread allocator within the operating system, it might entirely be that a single thread operates between 400Mhz, to 1,2Ghz on an intel Atom processor rated at 1,6Ghz.
With dual threads, the performance is anywhere between 1,2 and 2,4Ghz at best (though 1,8Ghz is more realistic).
If some program could be optimized for this processor, running 4 threads, 2 heavy ones as primary threads in core 0 and core 2, while the secondary threads are less heavy, running from core 1 and core 3 (the hyperthreading cores) it is theoretically possible to have a performance similar to a 3,2Ghz single core desktop cpu, from an intel atom.
Practically it's impossible to get that performance out of this cpu, because it's very difficult to keep all 4 threads 100% occupied all the time, and to balance the load to 100% all the time.
All this to illustrate the importance of hyperthreading.
True, in desktop area,it makes more sense to run a game from a single thread, without the overhead of multi threading to program.
But even then, large landscapes, hundreds of vehicles, require quite a powerful cpu to keep up.
And even with an intel Core i7, at a single thread, you'll not be able to fast forward a large and complex game fast enough....
as it stands now, it is best to run OpenTTD either dual threaded (for most older phones and netbooks) or tri-thread, cause that's where the market is heading to (quad threads).