[0.15.31]Nuke Creates Thousands of active entities

Bugs that are actually features.
London_
Inserter
Inserter
Posts: 21
Joined: Sat Jul 01, 2017 12:53 am
Contact:

[0.15.31]Nuke Creates Thousands of active entities

Post by London_ »

First, I know this everything is "working as intended" but it is detrimental to game play nevertheless.

OS: Win10 Laptop. 8GB RAM, i5-6200U, 2.4Ghz, and only 2 cores.

When playing with nukes as the tree-killer deluxe, Whenever I hit a particularly large patch of trees I always noticed a lot of slowdown. Finally looking into it again recently I found it's because when a tree is killed it creates a bunch of leaf/branch entities that are classified as "active entities". My 10+GW reactor setup creates ~10k active entities, and to have one atom bomb easily double that number is very undesirable. I would expect the lag to occur while the explosion is propagating, destroying the things in its path, not after everything has settled and nothing is moving anymore.

The branches only stick around for about 10 seconds, but it's still not something I think should happen.

Ideal outcome: When trees are destroyed by an atom bomb explosion all of it's debris are removed as well, or never spawn in the first place. The stumps don't cause any UPS issues. Blood from biters might have a similar problem, but they never get to the same density that trees do.

Here's a gallery of pre-nuke, during nuke, and after nuke, with the before and after on the branches disappearing. Added a picture of my reactor's active entities as well. Note the 25k entities from trees. http://imgur.com/a/EdGzL

Log attached, though it's not a crash.
Mods used: https://drive.google.com/drive/folders/ ... sp=sharing
Attachments
factorio-current.log
(9.1 KiB) Downloaded 93 times

Rseding91
Factorio Staff
Factorio Staff
Posts: 14107
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.15.31]Nuke Creates Thousands of active entities

Post by Rseding91 »

That's working correctly. All of the stumps are corpses - they fade over some time. We have some ideas to change the stick particles from entities to something else that we might do for 0.16 but none of this is bugged :) The sticks are created on the tree dying them after a second or two fall to the ground and are removed. The stumps are "active entities" but they're only updated once every 195 ticks and do almost nothing but decrement a counter until it reaches 0 and then are destroyed.

The branches fall, the trees explode, the corpses fade - it's all part of the game. We aren't just going to "remove it because it takes time" because we'd be left with a super boring game where nothing moves and everything uses a very boring static texture.
If you want to get ahold of me I'm almost always on Discord.

Rseding91
Factorio Staff
Factorio Staff
Posts: 14107
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.15.31]Nuke Creates Thousands of active entities

Post by Rseding91 »

Also: "Active entities" means nothing. It's what the active entity does that matters.

For instance: a laser counts as an "active entity" but does zero logic until there's something in range to shoot - it's not touched at all until something is in range to shoot at. A transport belt is an active entity but if it's empty it doesn't get touched, if it's 100% full and not moving it doesn't get touched.

Don't pay attention to the counter in the debug screen - that's the total number of updatable entities that exist in the world - not the total number that are currently active and ticking *each tick* in the game.
If you want to get ahold of me I'm almost always on Discord.

London_
Inserter
Inserter
Posts: 21
Joined: Sat Jul 01, 2017 12:53 am
Contact:

Re: [0.15.31]Nuke Creates Thousands of active entities

Post by London_ »

This is about what I figured would happen, but I do hope the sticks change to something that has negligible impact on game performance in .016 because it ruins the flow of the game when trying to clear trees for building space and my performance is cut in half because of something that doesn't move or have any other purpose than to lie on the ground for some ticks.

Rseding91
Factorio Staff
Factorio Staff
Posts: 14107
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.15.31]Nuke Creates Thousands of active entities

Post by Rseding91 »

London_ wrote:This is about what I figured would happen, but I do hope the sticks change to something that has negligible impact on game performance in .016 because it ruins the flow of the game when trying to clear trees for building space and my performance is cut in half because of something that doesn't move or have any other purpose than to lie on the ground for some ticks.
Nothing in the game has any purpose except to do what they do :D
If you want to get ahold of me I'm almost always on Discord.

d3x0r
Filter Inserter
Filter Inserter
Posts: 316
Joined: Sun Jun 04, 2017 8:56 am
Contact:

Re: [0.15.31]Nuke Creates Thousands of active entities

Post by d3x0r »

so just having a bunch of things with time-to-live counters ticking makes a notable slowdown? Sounds like they're scattered in the heap and need to be pooled.
Could wish this was semi-open-source like Space Engineers :)

Post Reply

Return to “Not a bug”