Factorio Developer Discusses Optimizations Used(old.reddit.com) |
Factorio Developer Discusses Optimizations Used(old.reddit.com) |
It seems like no tricky optimizations or complex algorithms, they just tick everything active every frame. The key is that they don’t tick things they don’t have to, and don’t render off-screen sprites, so “ticking” an entity is updating a tiny datastructure and maybe a few other datastructures it points to.
I especially like the rule that nothing can exceed O(N)
RAM speed is often the limiting "factor"(io) as to how fast the simulation can run or how large you can build.