3 ms·
Which is, funnily enough, roughly how it's programmed. Each entity has a state, time is advanced, and the threads run through their queue of entities and updat
by falcolas 6y ago
Which is, funnily enough, roughly how it's programmed.
Each entity has a state, time is advanced, and the threads run through their queue of entities and update their state, along with the state of connected entities. Since some entities interact directly with other entities (such as two fluid pipe segments), these queues are ordered (so the fluid movement and pressure calculations make sense).
For example, a belt would advance the items on it 1/60th of its speed. Inserters would look to see if there's room in the destination, if there are items within their reach on the belt, and start moving to pick them up. Assemblers would check to see if they're currently building something, if they're full (the quantity that determines "full" is based on whether there's an outgoing inserter attached), if they have the necessary ingredients in their incoming buffer, and start incrementing the creation timer. The outgoing inserter would check for items in the assembler's output, grab them, and so forth.
- Ericson2314 6y agoSee, Factorio should be implemented by reflashing an FPGA every time one places a new structure :D