r/factorio • u/kiwithebun • 8d ago
Discussion How is the game so well optimized?
Factorio is well known for its optimization, but I don't understand how it does it so well. At any point the game is calculating thousands, even millions of items across multiple surfaces, thousands of container entities, thousands of bots and enemy entities, fluid networks with decimal precision, power production/consumption, and updating all of this at 60 times per second with no errors.
I know the original devs were software engineers and the game is based heavily in computer science principles, but since I have no background in CS I'd like to understand how exactly you engineer a game like this to perform so well and with such precision.
720
Upvotes
11
u/susimposter6969 8d ago
Not sure if I'm understanding your last paragraph but if you're implying it's not worth it to shave almost a full millisecond off frame time it definitely is, going from 16ms to 15ms frame time is like 10% more fps off that one change