Page 1 of 1

[Allaizn] [0.17.79] Range of turrets and spitter shooting range problem

Posted: Sun Dec 08, 2019 7:31 pm
by Dudy99
Whilst playing industrial revolution, I came across a problem where my turrets sometimes can't shoot the large spitters due to poor design of my defence.

I noticed that the shotgun turrets have a range of 15
Screenshot (1).png
Screenshot (1).png (2.83 MiB) Viewed 4441 times
and the large spitters also have a range of 15
Screenshot (3).png
Screenshot (3).png (2.58 MiB) Viewed 4441 times
and yet the large spitters can shoot the shotgun turrets but the turrets can't shoot the large spitters, sending my bots into an endless repair cycle. This may not be a bug but I thought I should report it at least.

Re: [0.17.79] Range of turrets and spitter shooting range problem

Posted: Mon Dec 09, 2019 5:11 am
by TruePikachu
The spitters have an AoE attack which might instead be aimed at the walls, and hitting the turrets via splash damage.

Re: [0.17.79] Range of turrets and spitter shooting range problem

Posted: Mon Dec 09, 2019 6:57 am
by azesmbog
Dudy99 wrote:
Sun Dec 08, 2019 7:31 pm
and yet the large spitters can shoot the shotgun turrets but the turrets can't shoot the large spitters, sending my bots into an endless repair cycle.
This is normal behavior and there is no need to fix it.
Play should be difficult and difficult.
For the entire time of my game, more than 206 thousand repair kits were produced.
Which are spent including on such irrational behavior of bots during repair). At the same time, bots die in increased numbers. But this is a game.

I looked at the number of bots produced. 87 thousand in total. But this is not the limit). How many of them died - it's hard to say right away))

Re: [0.17.79] Range of turrets and spitter shooting range problem

Posted: Mon Dec 09, 2019 10:23 am
by Klonan
Hmm, I am torn between calling this a minor issue, and and bug...

Well in the long run, I think we should fix it
Range 15 things should be able to shoot at other range 15 things shooting us.

Re: [Allaizn] [0.17.79] Range of turrets and spitter shooting range problem

Posted: Mon Dec 09, 2019 11:48 am
by Deadlock989
Brought up many times on the IR thread. I think the problem is this.

Re: [Allaizn] [0.17.79] Range of turrets and spitter shooting range problem

Posted: Tue Dec 10, 2019 10:16 pm
by Allaizn
This bug is somewhat tricky in that the cause isn't as trivial as an unaccounted offset.
Part of this is caused by entity targeting only checking for the position of it's target instead of it's complete bounding box (while the position targeting that the spitters end up in doesn't have that problem).
The bigger part of this is caused by a more fundamental issue of what range is: after the above is fixed, an entity Y is in range of X if part of Y's bounding box clips X's attack range, which is (a potentially angle limited) circle around X's position. Note that this is not symmetric:
X's attack range centered on X's position intersecting Y's bounding box.
Y's attack range centered on Y's position intersecting X's bounding box.
These two are only equivalent if X & Y not only have the same range, but also the same bounding box. E.g. small spitters have a bounding box with radius 0.3 tiles, while laser turrets have one with radius 0.7 tiles. Even identical range will give the spitters a 0.4 tile range advantage.

I will discuss this with the others and see if and how we solve this and keep this report open until then. Feel free to give me feedback on how you think this is supposed to work (especially the angle limited case is weird in this regard) so that I can take that into account, too.

Re: [Allaizn] [0.17.79] Range of turrets and spitter shooting range problem

Posted: Tue Jan 21, 2020 6:12 pm
by Brambor
There is Fixed that turrets would sometimes fail to attack things that are in range.
But I don't see a developers post, closing this topic with "Fixed in 0.18".