Hello factorio builders,
I hope you enjoy lists and numbers, because you are going to be fed by these today :).
We know it is not perfect, but it got to a point, where the remaining problems are subtle or specific to a certain hardware/software configuration or specific mods. The marathon of 22 releases in the 0.11 is finally over, so we can fully concentrate on the new stuff.
The recent calls for additional programmers had its results and we now feel, that the amount of people is starting to be enough for this stage of Wube software. This is the list of the people that work on the game sorted by the time of joining our ranks:
Let's sum up what we promised for 0.12:
For me, the beginning of the new major release development is usually tied to the game optimisation. The game could never be optimised too much, as every factory can be expanded. This is especially important now, when the multiplayer is in the game, as more players build more stuff, obviously.
Most of the time, the biggest drain of the game update logic is the transport belts. There are usually many of these, and their logic was straightforward, but very inefficient. Every item on the transport belt was individual in-game entity with collision box and position. Once the item on the transport belt was supposed to move forward, all the nearby items (all in the 2X2 tile area) had to be checked for collision. There can be a lot of items nearby, especially if there is another transport belt next to the existing one so it can result in huge amount of checks.
There are 18 items to be checked for collision in this curve for every individual movement:
For 0.12, I completely rewrote the internal logic of all the transport belt related entities (belt, underground belt, splitter). The items on the belts are no longer represented as individual entities. These are just very simple internal structures moving on small invisible "rails". Once the item on the transport belt is supposed to move, only the item in front of it has to be checked for distance. Movement of the item just requires to check the item in front of it, instead of checking collision with 18 different entities.
The other advantage of this rewrite is, that we can now fully control the density of the belts and other properties without ever being worried of the belts being stuck, like in this bug report. The overall optimisation of this change was roughly 20% time reduction on the testing factory.
That combined with some other things we have done for 0.12, the update time is now reduced by 28% compared to 0.11. My dream would be to get to 50% so 0.12 would allow double factory sizes, but it is obviously harder and harder to optimise the game. On the other hand, it is more fun now, as it is starting to be more challenging.
I have been asked what is the distribution of the entity update time, so here are the results for the first 20 entities on the standard factory
Entity | Update time | Plans | |
Inserter | 18.01% | Reduce redundant vector rotations by precalculations. | |
Transport Belt | 12.44% | Improve cache locality and activation/deactivation logic. | |
Smoke | 9.66% | Shorten lifespan of the train smoke, custom simplification of it's movement logic. | |
Crafting Machine | 6.97% | (furnaces/assemblers/chemical plants/refineries). Implement the sleep/wakeup logic for these. | |
Solar Panel | 4.11% | Merge solar panels into groups internally when they are in the same network. | |
Fluid Box | 3.68% | ||
Mining Drill | 3.40% | ||
Unit | 3.33% | ||
Underground Belt | 2.80% | ||
Logistic Robot | 2.60% | ||
Splitter | 2.31% | ||
Accumulator | 1.58% | ||
Lamp | 1.47% | ||
Roboport | 1.21% | ||
Boiler | 0.47% | ||
Particle | 0.40% | ||
Vehicle | 0.31% | ||
Generator | 0.28% |
The thread for your comments and opinions is ready at our forums.