More realistic attack tracking for buildings

Request new features or present your ideas.
Post Reply
User avatar
Viech
Project Head
Posts: 2139
Joined: Fri Aug 03, 2012 11:50 pm UTC
Location: Berlin

More realistic attack tracking for buildings

Post 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.

Responsible for: Arch Linux package & torrent distribution, Parpax (map), Chameleon (map texture editor), Sloth (material file generator), gameplay design & programming, artistic direction

User avatar
ViruS
Granger
Posts: 1020
Joined: Sun Mar 11, 2012 4:24 am UTC
Location: Antartica - West Australian Post shore
Contact:

Re: More realistic attack tracking for buildings

Post 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"]

ImageImageYou[TubeImage

User avatar
Viech
Project Head
Posts: 2139
Joined: Fri Aug 03, 2012 11:50 pm UTC
Location: Berlin

Re: More realistic attack tracking for buildings

Post 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.

Responsible for: Arch Linux package & torrent distribution, Parpax (map), Chameleon (map texture editor), Sloth (material file generator), gameplay design & programming, artistic direction

User avatar
ViruS
Granger
Posts: 1020
Joined: Sun Mar 11, 2012 4:24 am UTC
Location: Antartica - West Australian Post shore
Contact:

Re: More realistic attack tracking for buildings

Post by ViruS »

We could just change the minimum angle back to 45.

ImageImageYou[TubeImage

Post Reply