But, how It works?

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
Post Reply
moechofe
Manual Inserter
Manual Inserter
Posts: 2
Joined: Mon Jul 09, 2018 1:09 pm
Contact:

But, how It works?

Post by moechofe »

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?

Jap2.0
Smart Inserter
Smart Inserter
Posts: 2339
Joined: Tue Jun 20, 2017 12:02 am
Contact:

Re: But, how It works?

Post by Jap2.0 »

This has been optimized a lot, and I'm not familiar with the specifics, but you'd probably be very interested in their weekly blog, which often includes technical things about optimization. Just a few that might interest you: Belt optimizations (1, 2), pathfinding, noise, GUIs, electric networks and smoke, misc. stuff, more various stuff (cont.), FPS and multithreading, and rendering (cont.). Let me know if there's anything else you want to read about specifically, and I can probably find something for you.
There are 10 types of people: those who get this joke and those who don't.

moechofe
Manual Inserter
Manual Inserter
Posts: 2
Joined: Mon Jul 09, 2018 1:09 pm
Contact:

[solved] Re: But, how It works?

Post by moechofe »

Thank you, I found what I was looking for.

Post Reply

Return to “Technical Help”