Page 1 of 1

"Active" entity count in debug info

Posted: Fri Dec 02, 2016 12:54 am
by BenSeidel
Hi,
I have an internals question about the way factorio works, specifically about the Active entity count that appears when the debug information is displaying (F5, etc)
ActiveEntities.jpg
ActiveEntities.jpg (87.08 KiB) Viewed 2130 times
Do all the active entities get cycled through by the game logic each tick? or is there a separate list/count (not displayed to the user) that are the entities that are allocated CPU time each tick?

Thanks.

Re: "Active" entity count in debug info

Posted: Fri Dec 02, 2016 9:38 am
by Choumiko
Each active entity get's updated each tick, since it could have work to do.
As an example: An inserter that is supposed to fill an assembler will be deactivated if the assemblers input is filled. Once the assembler produces an item, the assembler activates the inserter and it will check the belt/stuff for items to insert. ronse and repeat. It's probably similar for other entities (Assembler deactivates if output inventory is full, reactivates if item is pulled out).

That's how i think it works or what i think i remember reading in one of the FFF, so don't take it for granted :D

Re: "Active" entity count in debug info

Posted: Sat Dec 03, 2016 4:11 pm
by Rseding91
"Active entities" is the count of entities that get updated each tick.

They're in a different list to the total entities count. Entities not in the "Active" section don't get touched during normal tick updates.

Re: "Active" entity count in debug info

Posted: Sun Dec 04, 2016 12:55 am
by BenSeidel
Thanks Rseding,
I just wanted to make sure before I posted some of my ideas based on this assumption.