Page 1 of 1

More realistic attack tracking for buildings

Posted: Wed Nov 21, 2012 11:36 am UTC
by Viech
Theyain wrote:

http://pictir.com/pic/Za6K.jpg acid tubes can be target at corners where their acid can not hit you

I have the impression that buildings don't attack unless there's a clear line of sight between the origins of building and target. This behaviour might be crucial for the spinup delay of a turret, but it makes for some really unrealistic behaviour.
For example I made the girders in lower storage on parpax nonsolid so you can shoot through them. However, the trims at the edges of the bars are not nonsolid. if you are a goon running on those bars turrets below you will constantly track you but never fire, because even though they could hit you all the time they don't want to since they don't see your origin long enough.

So if we want the acid tube to behave realistic we might need to have a new spinup algorithm for the turret. (If we let buildings shoot as soon as the hitboxes can see each other then you couldn't run circles around turrets anymore because they wouldnt loose track of you.)

Any ideas of how to fix both issues without taking away the possibility to circle around turrets? My idea would be that buildings target a box inside the hitbox of their opponents that gets bigger when the enemy is farther away, but I'm not sure how easy this could be implemented.


Re: More realistic attack tracking for buildings

Posted: Wed Nov 21, 2012 12:05 pm UTC
by ViruS
Viech wrote:

However, the trims at the edges of the bars are not nonsolid. if you are a goon running on those bars turrets below you will constantly track you but never fire, because even though they could hit you all the time they don't want to since they don't see your origin long enough.

That's not a bug. Here's a bug:
Long time ago, i'm pretty sure i sent this issue to github. Unless you're talking about directly below the turrets, there's the classic trick that i discovered on KoRx then realised GPP also had it too on the map UTCS. Basically what happens is that the turret cannot aim past 30 degrees downwards, but shoots at anything above 45 degrees below its horizontal.

But your problem is just the fact the turret's turning towards you. Of course it won't fire if it cant see you. That's intentional. What i said above isn't intentional and can be fixed easily by a change of one or two numbers in the source code.

Also that screenshot you provided for the acid tube - Pretty much every game i know of has a similar thing. Stand behind a wall, but very close to the edge. Your hitbox should stick out even though you cant see past the wall. That's like the acid tube case - and every other game with bots, sentries etc. But i would like to improve the acid tube a.i. [actually it doesn't have one at the moment, it's just "if close enough, fire, those who can be seen and are in the area are hurt"]


Re: More realistic attack tracking for buildings

Posted: Wed Nov 21, 2012 12:33 pm UTC
by Viech

Believe me, what I describe feels totally bugged (and limits me in map design). The turret below the bar can see (and could shoot) me at every given moment but the fact that a small trim gets in the way from time to time lets the spinup start from fresh. This should happen with a small distance when it can be explained with an aiming delay but in my example the turret would need to adjust its yaw by a neglible amount.

Besides, I agree with you that the turret should be able to shoot down from a higher level. Tremulous turrets simply can't do that.


Re: More realistic attack tracking for buildings

Posted: Fri Nov 23, 2012 5:03 am UTC
by ViruS

We could just change the minimum angle back to 45.