Page 1 of 1

Artillery and Flamethrower turret sleep

Posted: Thu Feb 25, 2021 9:02 pm
by AngledLuffa
TL;DR
All turret types should have the ability to sleep when no enemies are near.
What ?
Looking at the entity time usage debug stats, I can see that artillery turrets and flamethrower turrets are using a small but meaningful amount of time. This is on a map which currently has no biters at all (I occasionally turn them off to focus on building, then turn them back on to make sure the defenses are airtight).

Laser and bullet turrets are both capable of sleeping and not using any UPS when there are no enemies near. It would make sense for flamethrower turrets to be able to do the same thing. They have a maximum possible radius of effect, just like the other turret types, and when nothing is near they can just wait to be woken up.

Presumably artillery turrets can stay asleep unless an enemy builds a targetable object within its range. I've seen enemy artillery turrets target players, though, so perhaps this is a bit more complicated.

Attached is an image showing 44 artillery turrets taking 0.025s and 345 flamethrower turrets taking 0.035s of the update, despite there being nothing for either type of turret to target.
Why ?
Improving the UPS in this manner would let people build bases with more artillery and flamethrower turrets without limiting their ability to expand.

Re: Artillery and Flamethrower turret sleep

Posted: Fri Feb 26, 2021 7:33 am
by ssilk
As far as I remember they go to sleep, if there is no enemy within some chunks around. But don’t take me for granted, I could mix this up with something different. 8-)

Re: Artillery and Flamethrower turret sleep

Posted: Sat Feb 27, 2021 3:54 pm
by AngledLuffa
Possibly, but as you can see in the above screenshots, the update time per tick is almost 0.001s for an artillery. Flamethrowers seem to be 0.0001s. It's not a ton but it starts to add up if you put down a lot of artillery and line your walls with flamethrowers. Might be worth investigating why they aren't fully asleep.