spool5520 wrote:So I am making a game similar in scope and feel to Factorio. Not a Factorio clone by any means but its one of my favorite games and I cant help but take some inspiration from it. As I get further along in the development process I am starting to see just how much of a masterpiece Factorio is both technically and artistically. My biggest amazement is how Factorio handles updating so many entities/objects all the time across so much space. I mean I have had some seriously huge bases with railways connecting them to very far out locations with ever expanding complexity and Factorio handles all of this without as much as a frame drop. How is this possible? How does that much information fit in memory? How do you guys handle so much going on? I am relatively new to programming but I know my way around. But what you have accomplished is absolutely mind boggling to me.
Thank you, this could make me feel smart, but the reality, that there is just lot of work behind it.
There were many iterations, when Factorio started to be slow, so I just simply used a performance tool, to see where is most of the time wasted, and tried to do differend kind of optimisations or tricks to make it work faster.
Sometimes, these are optimsiation of the calculation itself (better memory management, code structure etc.).
Other times, it is just they way of thinking "What is the computer doing over and over, and it clearly has no sense?" For example, empty belts were actually taking some time, even if it was clear that they don't need to update, or inserters checking empty chest over and over and things like that.
DaveMcW wrote:Well, modern computers run at 2 GHz, or 44 million items per tick. The art is to avoid putting too much junk between the game and the processor.

Yes, and lot of custom tricks.
https://www.factorio.com/blog/post/fff-82
https://www.factorio.com/blog/post/fff-84
P.S. When can we play the prototype of the game? I want more games as Factorio, so I have more things to play
