Hello fellow builders,there is this commotion about the paid mods on steam. (It had been cancelled already). I understand that the implementation was far from optimal, as people would be suddenly expected to pay for mods that were free until now. It was also sad, that the modders were to get only 25% percent of the money. But I personally think, that there is nothing wrong about the idea generally. If a reasonable price tag on a great mod allows the creator to develop the mod full time, create professional content, and people are willing to pay for it, everyone wins. Free mods would still exist so it would be up to the players to choose. I'm NOT saying we are going to allow paid mods for Factorio anytime soon. But I'm not denying this possibility in the far future.
The smoke particle is moved every tick (60 times per second). The movement is based on it's movement vector (a). The speed of the smoke is slowed down every tick, by multiplying the speed by a modifier (q = 0.995).
If I wanted to calculate what is the position of the smoke in n ticks in the future, the movement in the first tick is a (movement vector), in the 2nd tick, it is a + a*q (movement multiplied by the slowdown), in the 3rd tick it is a + a*q + (a*q)*q and so on:
And just a common high school knowledge gives you this formula:
Usage of the formula lets me know the position of the smoke without the need to update it every tick. The wind and animation movements had to be taken into consideration as well, but these can be calculated easily as well. So in the current 0.12 version, the smoke position is updated only once per 120 ticks (2 seconds), but when you look at the movement, it still looks as smooth before, as the rendered position is calculated using the formula as well. This helped the performance a lot, as trains, boilers, generators furnaces are all emitting the smoke.
Huge factories that emit great amount of pollution are attracting a lot of large groups of enemies. The player often doesn't even know about it in this phase, as they just get killed by the automated defences. But the simulation of these units can be also quite performance heavy.
The optimisations we made here is quite pragmatic. We added 4th level of biters and spitters (Behemoth biter/ Behemoth spitter) that are extra strong. So instead of group of 20 big biters, 3 behemoths can be sent. The power of the attack is similar, but the computation required is greatly reduced.
As usual, let us know what you think at our forums.