But, how It works?
Posted: Mon Jul 09, 2018 2:26 pm
Hi,
As a developer, I would like to understand how factorio internally handle stuff/data, especially, how factorio track and update the position of every single resource in the game?
I made some thought experiment and came with this ideas:
1. Each sprite of resources that move on belt has coordinates. So, at each tick, the game as to update coordinates of every resources and do stuff when the enter the next tile.
That solution should cost enormous quantity of computation and tests.
2. Each tiles on game only track the resources placed on it. At each tick, it update position of the resources. When they enter the next tile, the owner (tile) of the resource change.
Some computation can be mutualized, but it should cost a lot anyway.
Any other ideas?
As a developer, I would like to understand how factorio internally handle stuff/data, especially, how factorio track and update the position of every single resource in the game?
I made some thought experiment and came with this ideas:
1. Each sprite of resources that move on belt has coordinates. So, at each tick, the game as to update coordinates of every resources and do stuff when the enter the next tile.
That solution should cost enormous quantity of computation and tests.
2. Each tiles on game only track the resources placed on it. At each tick, it update position of the resources. When they enter the next tile, the owner (tile) of the resource change.
Some computation can be mutualized, but it should cost a lot anyway.
Any other ideas?