[Rseding91] [2.0.15] Demolishers take a disproportionate amount of cpu time

H4ckerxx44
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sun Nov 17, 2024 7:52 am
Contact:

Re: [Rseding91] [2.0.15] Demolishers take a disproportionate amount of cpu time

Post by H4ckerxx44 »

Rseding91 wrote: ↑Tue Dec 03, 2024 5:08 pm You can simply have your friends kill all of the demolishers if it's that big of an issue for you. Or slow down the game speed to allow your computer to keep up.

The root issue is just that *they take a lot of CPU time* because they always exist once uncovered until killed. That was part of their design doc so I can't simply just make them not do that or it breaks how they were intended to work (slowly patrol their area until killed). Some people explored on Vulcanus and generated a lot more worms and so have a lot of them going at all times. That wasn't thought about in their design and that's the issue that needs to be re-thought about and handled - if it even can be.
Forgive me if that approach has already been thought about and deemend impossible:
Wouldn't deactivating the demolisher that do not touch claimed chunks work?

In reality you, as a played, only really car eabout the demolishers (and their territory) which directly "attach" to your claimed area, no reason to care about a demolisher which is "1 or more demolishers away" if you get what I mean.

That way, the amount of "active" demolisher would only be the amount of demolishers that would be relevant to you killing.

Without me knowing the codebase or underlying mechanics, I would try to implement that and see how it improves peoples performance, if need be make it a band-aid fix to have some time to properly fix it.

Also first time posting here, if I messed anything up, I am sorry!
nzer
Long Handed Inserter
Long Handed Inserter
Posts: 56
Joined: Sat Jun 24, 2023 11:30 pm
Contact:

Re: [Rseding91] [2.0.15] Demolishers take a disproportionate amount of cpu time

Post by nzer »

I feel like a relatively simple solve for this is that demolishers are only updated if there's a player-built structure in their territory or part of their territory has active radar coverage.
Sun Serega
Manual Inserter
Manual Inserter
Posts: 3
Joined: Mon Oct 28, 2024 5:55 pm
Contact:

Re: [Rseding91] [2.0.15] Demolishers take a disproportionate amount of cpu time

Post by Sun Serega »

nzer wrote: ↑Wed Dec 11, 2024 4:21 am only updated if
The only answer we got from the devs was that they did not want to change the behavior. I guess they are talking about how demolishers destroy rocks and cliffs when they pass by, but devs could at least disable particles without affecting that.

A really good solution would be to, for example, not compute demolishers all the time and instead find what should've been destroyed by now when the chunk is revealed. You don't need to trace out their path in chronological order, and a lot of precision can be sacrificed without changing the outcome (because of how slow they usually move).

But IMO, until such a complex solution is implemented, it's best to just do something dumb like pausing demolishers. The devs are the main people who care about such imperfections. Meanwhile, I bet most players would either not care at all or care way more about this lag than simulation authenticity.
nzer
Long Handed Inserter
Long Handed Inserter
Posts: 56
Joined: Sat Jun 24, 2023 11:30 pm
Contact:

Re: [Rseding91] [2.0.15] Demolishers take a disproportionate amount of cpu time

Post by nzer »

Sun Serega wrote: ↑Wed Dec 11, 2024 8:58 am The only answer we got from the devs was that they did not want to change the behavior. I guess they are talking about how demolishers destroy rocks and cliffs when they pass by, but devs could at least disable particles without affecting that.
If there isn't radar coverage and there aren't any player-created structures in the territory there isn't any way for the player to know what the demolisher is doing, so for all intents and purposes it doesn't matter whether it's asleep or patrolling.

There's technically an impact in that patrolling demolishers will destroy cliffs and rocks along their route, as you point out, but I agree with you that this cannot possibly be of any real importance to players, and if we're going to talk about simulation integrity the current behavior is arguably already wrong. Demolishers don't come into existence when the player discovers them, in-universe they should be there patrolling before the player even touches down on the planet. So there should already be no destructibles on their patrol paths, because they'd have already destroyed them.
User avatar
GregoriusT
Filter Inserter
Filter Inserter
Posts: 356
Joined: Wed Apr 10, 2019 6:42 pm
Contact:

Re: [Rseding91] [2.0.15] Demolishers take a disproportionate amount of cpu time

Post by GregoriusT »

nzer wrote: ↑Wed Dec 11, 2024 5:49 pm If there isn't radar coverage and there aren't any player-created structures in the territory there isn't any way for the player to know what the demolisher is doing, so for all intents and purposes it doesn't matter whether it's asleep or patrolling.
Note: Radars can have a LOT of range even without quality. Just spam enough of them.
Don't underestimate Landmines!
Biters bite, Spitters spit, Spawners spawn and Worms... worm? - No, they throw their vomit! They even wind up to directly hurl it at you! friggin Hurlers...
Rubicj
Burner Inserter
Burner Inserter
Posts: 19
Joined: Wed Feb 27, 2019 2:26 am
Contact:

Re: [Rseding91] [2.0.15] Demolishers take a disproportionate amount of cpu time

Post by Rubicj »

GregoriusT wrote: ↑Tue Dec 03, 2024 8:48 pm
2. You basically must have Debug Overlays on to detect the Demolishers in those non-radar-ed chunks (radar would generate even more), and attack them with Artillery to prevent more Chunks from being generated. Which if you only needed one shot to aggro them would be fine, but you need to focus on where the demolisher goes and shoot it more once it loses aggro again, otherwise it wont run into your Trap.
yeah, I realized this after I ran around with a railgun and killed a few dozen, the chunks revealed by searching for them make it worse and spawn more :(
Arcus
Burner Inserter
Burner Inserter
Posts: 16
Joined: Thu Dec 14, 2023 12:07 pm
Contact:

Re: [Rseding91] [2.0.15] Demolishers take a disproportionate amount of cpu time

Post by Arcus »

Rubicj wrote: ↑Wed Dec 11, 2024 8:47 pm
GregoriusT wrote: ↑Tue Dec 03, 2024 8:48 pm
2. You basically must have Debug Overlays on to detect the Demolishers in those non-radar-ed chunks (radar would generate even more), and attack them with Artillery to prevent more Chunks from being generated. Which if you only needed one shot to aggro them would be fine, but you need to focus on where the demolisher goes and shoot it more once it loses aggro again, otherwise it wont run into your Trap.
yeah, I realized this after I ran around with a railgun and killed a few dozen, the chunks revealed by searching for them make it worse and spawn more :(
Yeah, I specifically used spidertrons to lure them into player railgun range without generating more chunks.

There seems to be lower performance impact while they're off-map but a demolisher will "exist" if any part of it's territory has been generated. Hence carelessly running around just causes more of them to spawn.
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 3296
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [Rseding91] [2.0.15] Demolishers take a disproportionate amount of cpu time

Post by boskid »

H4ckerxx44 wrote: ↑Wed Dec 11, 2024 4:04 am In reality you, as a played, only really car eabout the demolishers (and their territory) which directly "attach" to your claimed area, no reason to care about a demolisher which is "1 or more demolishers away" if you get what I mean.
Hm... this is false. Any amount of N past which demolishers would not spawn would mean a simple strategy of "sneak past initial N layers after landing and you do not ever need to worry about demolishers" since you would be building in a territory without anything to attack you.
credomane
Filter Inserter
Filter Inserter
Posts: 311
Joined: Tue Apr 12, 2016 6:21 pm
Contact:

Re: [Rseding91] [2.0.15] Demolishers take a disproportionate amount of cpu time

Post by credomane »

I love that demolisher's are always active but what about some of these ideas?


1. Possible to significantly reduce the TTL on the SmokeWithTrigger when the demolisher is patrolling so there end up being far less SmokeWithTrigger to deal with in total? Theory being the demolisher is casually moving around without much effort so there isn't much of a trail being left. Piss it off and it is now moving with effort & purpose an leaving a massive trail.

2. If all of a demolisher's territory is in uncharted/unrevealed chunks move the demolisher to a "No Smoking" list. The "No Smoking" list disables spawning SmokeWithTrigger. Angering the demolisher kicks them out of the "No Smoking" list until it goes back to patrolling for 1 minute and the "No Smoking" conditions are met again. Dunno how expensive and entity collision check is but could have "No Smoking" demolishers spawn a SmokeWithTrigger on collision with an entity so they still destroy stuff like normal which should solve "behavior" problems that I can think of. Sure this might lead some visual oddities still but unless you really looked for them I doubt most people would even notice or care.
OvermindDL1
Fast Inserter
Fast Inserter
Posts: 195
Joined: Sun Oct 05, 2014 6:12 am
Contact:

Re: [Rseding91] [2.0.15] Demolishers take a disproportionate amount of cpu time

Post by OvermindDL1 »

Why aren't the worms just non-ticking/deactivated unless there is a player owned entity or radar coverage over anywhere in their terrain (if idling and not attacking and in their terrain of course)?

Turning on the debug overlay shows almost a hundred demolishers in the dark unexplored area of the map, so yeah, any guess why I can't hit 60 UPS at all? And going to try to introduce them to a very improved railgun just generates 2+ more for every 1 killed, which doesn't help...

(if only artillery could be told to auto target them even in the dark so we could at least drag them out without cheating their locations onto the map...)

(Also, how do you turn down the UPS on a server without destroying achievements? And why doesn't the server slow down to be just slightly slower than the slowest player if the slowest player can't hit 60 UPS (on a 16 core cpu of all things...)?)
Arcus
Burner Inserter
Burner Inserter
Posts: 16
Joined: Thu Dec 14, 2023 12:07 pm
Contact:

Re: [Rseding91] [2.0.15] Demolishers take a disproportionate amount of cpu time

Post by Arcus »

Until such a time where this gets patched/optimized as far as I can tell the best solutions are:

- Get a chunk eraser tool, turn on "show-unit-territories" and "show-segmented-units-on-chart" and then erase any chunks that are part of a demolisher's territory.
- Use artillery/spidertron to kill/lure demolishers away from the map edge so the engineer can kill them with the railgun without generating new chunks.
aka13
Filter Inserter
Filter Inserter
Posts: 824
Joined: Sun Sep 29, 2013 1:18 pm
Contact:

Re: [Rseding91] [2.0.15] Demolishers take a disproportionate amount of cpu time

Post by aka13 »

OvermindDL1 wrote: ↑Thu Dec 12, 2024 7:32 pm Why aren't the worms just non-ticking/deactivated unless there is a player owned entity or radar coverage over anywhere in their terrain (if idling and not attacking and in their terrain of course)?

Turning on the debug overlay shows almost a hundred demolishers in the dark unexplored area of the map, so yeah, any guess why I can't hit 60 UPS at all? And going to try to introduce them to a very improved railgun just generates 2+ more for every 1 killed, which doesn't help...

(if only artillery could be told to auto target them even in the dark so we could at least drag them out without cheating their locations onto the map...)

(Also, how do you turn down the UPS on a server without destroying achievements? And why doesn't the server slow down to be just slightly slower than the slowest player if the slowest player can't hit 60 UPS (on a 16 core cpu of all things...)?)
Last time on my memory this was denied, and wouldve been useful even before demolishers. - viewtopic.php?f=23&t=104630
Pony/Furfag avatar? Opinion discarded.
Loup&Snoop
Manual Inserter
Manual Inserter
Posts: 3
Joined: Wed Dec 04, 2024 4:33 am
Contact:

Re: [Rseding91] [2.0.15] Demolishers take a disproportionate amount of cpu time

Post by Loup&Snoop »

boskid wrote: ↑Thu Dec 12, 2024 7:50 am
H4ckerxx44 wrote: ↑Wed Dec 11, 2024 4:04 am no reason to care about a demolisher which is "1 or more demolishers away" if you get what I mean.
Hm... this is false. Any amount of N past which demolishers would not spawn would mean a simple strategy of "sneak past initial N layers after landing and you do not ever need to worry about demolishers" since you would be building in a territory without anything to attack you.
I suspect the condition for activating a demolisher should be: If its territory has at least 1 entity (player force) OR 1 active/visible chunk, then activate the demolisher.

Managing active chunks and buildings should be straightforward enough. The only entity that could introduce cheese by travelling between active chunks would be bots. For that case, it would suffice to check the convex hull of each logistic network.

This might be naive, but this would be the bare minimum to make sure a demolisher always exists in chunks where it could theoretically do something. Also the set of demos that require calculation only gets updated when there is actual activity on Vulcanus.
Post Reply

Return to β€œAssigned”