I think the answer lies with team red and team blue.fur_and_whiskers wrote: βTue Dec 04, 2018 3:39 amInteresting that both Factorio and Oxygen Not Included have announced they're doing this within a month of each other. Really hope its a result of colaboration, if so everyone wins.
If you look at CPU development, there is one major bottleneck: memory latency. If you make the CPU twice as fast, it will spend twice as many CPU cycles waiting for the memory and increased CPU performance is diminishing. This means the way to increase performance is to hide memory latency. CPU cache is one such way, but it requires the programmers to organize memory in a way where the cache works efficiently, something like placing fluid boxes sequentially in memory meaning when one block is read, multiple fluid boxes are placed in the (much faster) CPU cache meaning when reading them one by one, only the first one will require the full memory latency wait.
Another approach is hyperthreading. That's a CPU core with two tasks. If one task is waiting for the memory, the other task will execute at the same time to keep the CPU core itself busy. It's said that this increase the CPU power by 30%, though it highly depend on the code you execute. No memory latency would make hyperthreading useless.
Then increasing the core performance has become this problematic, their answer is to increase the core count. It became 2 around 2005, later 4, which we have had for quite a while now, but last year AMD released Ryzen. Since AMD can't beat Intel on core performance, their answer is to increase the number of cores dramatically to win on multi core performance. Intel's respond is the same: more cores.
Less than 2 years ago, the fastest gaming CPU had 4 cores. Now it has 8. The near future will most likely be a world where gamers have more and more CPU cores.
This brings us back to Factorio and Oxygen not included. Both games are at the end of the early release cycle. Both have to optimize for performance. In a world where the CPU core count is increasing rapidly, it will be logical to optimize for multi core support. This means optimizing the same way is not because the games share anything, but rather because they run on the same hardware and they optimize for the hardware.
Why they optimize pipes for multithreading? My guess is it has to do with memory. Multithreading can be dead slow (even slower than single core) if the cores share memory and they have to communicate between cores to not corrupt memory for each other. If you can figure out a way to make a piece of code, which will only write to memory not used by any other code at the same time, no coordination is needed. Pipes seems like ideal candidates for this because pipes, which aren't connected will not affect each other, meaning they can be calculated without any memory coordination at all.
Another hint that they did not share code is I think we were told Factorio is written in C++. I know Oxygen not included uses the unity engine, meaning it has to be written in C#. If two games should share code in any way, a good start would be to use the same programming language.
Sure I'm an outsider making guesses based on what has been made public (hence not covered by contract and can speak my mind), but knowing software development and how companies usually work, I would say that to say two for profit games share code because they multithread pipes for optimization is like saying two car companies work together because they both use cars with wheels optimized for road usage.