Projectile collision?

Other talk that doesn't fit elsewhere.
This is for General Discussion, not General chat.
Post Reply
themousemaster
Regular
Regular
Posts: 611
Joined: 10 Nov 2006, 16:54

Projectile collision?

Post by themousemaster »

I know that Watermelon is working on a new routine to check projectile collision routines, which I find very cool.

However, I have some questions about the implementation being developed.  I'll use a standard example of mine to illustrate:


One of my favorite defensive schemes is to line up buildings like this:

1--2--3
-------
1--2--3

Where 1 is some form of hardpoint, 2 is a plasma cannon emplacement, and 3 is some form of bunker.  Dashes are empty space, used so that my own vehicles can still get through this theoretical chokepoint. 


Enemies are expected to approach from the right (I.E. this is an East-facing chokepoint into my base).  So lets rearrage this diagram to look like this:

*  1--2--3  T
--------------
*  1--2--3  T


With the new hit routines, would:

A)  The plasma cannon emplacement at point 2 collide with, and likely destroy in one hit, the bunker sitting in front of it at 3, if it attempts to fire at enemy tanks T?

B)  The Hardpoint at 1, despite having a height over the defenses in front of it, would it hit the plasma emplacement OR the bunker at 2 or 3 if it attempts to fire at tanks T?

C)  Lets assume I have a VTOL craft approaching from the * symbols, firing scourge rockets at tanks T.  Would it collide with any of the structures between * and T?




Lastly (and not on the above chart), how would collision of Artillery work?  From the design specifics of what I understand so far, it'd be possible for artillery to hit something en route to its target.  But if that is the case, that would make artillery in general horrible in base defense, because if opposing tanks move to close range with your defenses (with faster propultion type tanks, they can close that gap in about a second), artillery behind said defenses will end up obliterating your own defenses themselves...?
User avatar
Watermelon
Code contributor
Code contributor
Posts: 551
Joined: 08 Oct 2006, 09:37

Re: Projectile collision?

Post by Watermelon »

themousemaster wrote: I know that Watermelon is working on a new routine to check projectile collision routines, which I find very cool.

However, I have some questions about the implementation being developed.  I'll use a standard example of mine to illustrate:


One of my favorite defensive schemes is to line up buildings like this:

1--2--3
-------
1--2--3

Where 1 is some form of hardpoint, 2 is a plasma cannon emplacement, and 3 is some form of bunker.  Dashes are empty space, used so that my own vehicles can still get through this theoretical chokepoint. 


Enemies are expected to approach from the right (I.E. this is an East-facing chokepoint into my base).  So lets rearrage this diagram to look like this:

*  1--2--3   T
--------------
*  1--2--3   T


With the new hit routines, would:

A)  The plasma cannon emplacement at point 2 collide with, and likely destroy in one hit, the bunker sitting in front of it at 3, if it attempts to fire at enemy tanks T?

B)  The Hardpoint at 1, despite having a height over the defenses in front of it, would it hit the plasma emplacement OR the bunker at 2 or 3 if it attempts to fire at tanks T?

C)  Lets assume I have a VTOL craft approaching from the * symbols, firing scourge rockets at tanks T.  Would it collide with any of the structures between * and T?




Lastly (and not on the above chart), how would collision of Artillery work?  From the design specifics of what I understand so far, it'd be possible for artillery to hit something en route to its target.  But if that is the case, that would make artillery in general horrible in base defense, because if opposing tanks move to close range with your defenses (with faster propultion type tanks, they can close that gap in about a second), artillery behind said defenses will end up obliterating your own defenses themselves...?
Current projectile collision check ignores your own(project's player's team) and its allies units/structures,which means projectile can still fly through friendly units and buildings,because it will be chaotic without additional line of sight tests and ai supports before firing a weapon.
tasks postponed until the trunk is relatively stable again.
User avatar
D.Durand
Trained
Trained
Posts: 55
Joined: 16 Jan 2007, 23:20
Location: France

Re: Projectile collision?

Post by D.Durand »

Remember Total Annihilation, when your defenses destroy your own structures ?
karmazilla
Trained
Trained
Posts: 84
Joined: 26 Aug 2006, 21:05

Re: Projectile collision?

Post by karmazilla »

Artillery does deal damage to friendly structures and units, but the damage is inflicted by the area effect of the arty shells and ain't that big a problem sinc the artillery don't aim directly at your own units.

On the note of artillery, I've noticed that on long range, the arty becomes inaccurate, and with this new hit system, the end result is that the artillery deals exceptionaly little damage, if anything at all.
My theory on this is that the targeting calculations are done with integers, or low precision floats, for the sake of performance - this wasn't previously a problem since the question of whether or not you hit anything was decided by a dice. But now, the notorious and constant mis-aim on long distances considerably degrades the usefulness of artillery.
Howitzers are to a degree remedied by their large area of effect, but then consider the Angel and Archangel missiles - they don't affect an entier area but only a point, and therefor are completely useless on the long distances that are their sole reason for existing in the first place.

So watermelon, if you got a spare moment, then please look into giving the artillery a reasonable hit chance again. Although I really like how units can now dodge projectiles, It's a shame a side effect is that artillery on long distances now can't even hit stationary buildings.
User avatar
Watermelon
Code contributor
Code contributor
Posts: 551
Joined: 08 Oct 2006, 09:37

Re: Projectile collision?

Post by Watermelon »

karmazilla wrote: Artillery does deal damage to friendly structures and units, but the damage is inflicted by the area effect of the arty shells and ain't that big a problem sinc the artillery don't aim directly at your own units.

On the note of artillery, I've noticed that on long range, the arty becomes inaccurate, and with this new hit system, the end result is that the artillery deals exceptionaly little damage, if anything at all.
My theory on this is that the targeting calculations are done with integers, or low precision floats, for the sake of performance - this wasn't previously a problem since the question of whether or not you hit anything was decided by a dice. But now, the notorious and constant mis-aim on long distances considerably degrades the usefulness of artillery.
Howitzers are to a degree remedied by their large area of effect, but then consider the Angel and Archangel missiles - they don't affect an entier area but only a point, and therefor are completely useless on the long distances that are their sole reason for existing in the first place.

So watermelon, if you got a spare moment, then please look into giving the artillery a reasonable hit chance again. Although I really like how units can now dodge projectiles, It's a shame a side effect is that artillery on long distances now can't even hit stationary buildings.
I think giving artillery weapon a hit radius bonus to its 'intended target' would probably fix this,seems it misses its intended target most of time for some unknown reason(maybe zdiff problem)
tasks postponed until the trunk is relatively stable again.
themousemaster
Regular
Regular
Posts: 611
Joined: 10 Nov 2006, 16:54

Re: Projectile collision?

Post by themousemaster »

karmazilla wrote: Artillery does deal damage to friendly structures and units, but the damage is inflicted by the area effect of the arty shells and ain't that big a problem sinc the artillery don't aim directly at your own units.

On the note of artillery, I've noticed that on long range, the arty becomes inaccurate, and with this new hit system, the end result is that the artillery deals exceptionaly little damage, if anything at all.
My theory on this is that the targeting calculations are done with integers, or low precision floats, for the sake of performance - this wasn't previously a problem since the question of whether or not you hit anything was decided by a dice. But now, the notorious and constant mis-aim on long distances considerably degrades the usefulness of artillery.
Howitzers are to a degree remedied by their large area of effect, but then consider the Angel and Archangel missiles - they don't affect an entier area but only a point, and therefor are completely useless on the long distances that are their sole reason for existing in the first place.

So watermelon, if you got a spare moment, then please look into giving the artillery a reasonable hit chance again. Although I really like how units can now dodge projectiles, It's a shame a side effect is that artillery on long distances now can't even hit stationary buildings.

I know artillery can hurt friendlies if it lands on them, I was worried about it hitting friendly targets specifically.  Watermelon eased that worry of mine; no friendly collisions works fine in my book.

As far as the angelfire missles... its true that a change as stated would make them largely useless against mobile targets.  However, put a couple on a mobile body and have them target a base defensive structure.  They are still far more effective than howitzers for 1-shot-and-run tactics, especially against hardpoints  :).
karmazilla
Trained
Trained
Posts: 84
Joined: 26 Aug 2006, 21:05

Re: Projectile collision?

Post by karmazilla »

I'm not talking about mobile targets, but stationary targets; buildings. (an shoting from emplacements)

The notorious inability to hit stationary targets on long distances is a bad thing, IMO. My observations say that they end up always hitting too short of the target - they have excellent precision in hitting the same spot over and over, it's just a shame that the target isn't at the spot they're hitting.

Try building a large battery of archies and have them fire at a target very far away, then observe your target - they'll only hit it by accident.
User avatar
Watermelon
Code contributor
Code contributor
Posts: 551
Joined: 08 Oct 2006, 09:37

Re: Projectile collision?

Post by Watermelon »

karmazilla wrote: I'm not talking about mobile targets, but stationary targets; buildings. (an shoting from emplacements)

The notorious inability to hit stationary targets on long distances is a bad thing, IMO. My observations say that they end up always hitting too short of the target - they have excellent precision in hitting the same spot over and over, it's just a shame that the target isn't at the spot they're hitting.

Try building a large battery of archies and have them fire at a target very far away, then observe your target - they'll only hit it by accident.
I think I know what caused the this,
try removing extendeRad in proj_InFlightIndirectFunc function in projectile.c

and replace

'iDist > (extendRad- (SDWORD)psObj->targetRadius)' with 'iDist > (iRad - (SDWORD)psObj->targetRadius)' in the same function

the 'extendRad'(20% more lifespan) made the projectile traverse 20% further in vXY direction accidently due to the way wz updates projectiles coordinates,hence the 'fixed' miss spot...it wont affect direct weapon since they dont have the trajectory like indirect ones have
tasks postponed until the trunk is relatively stable again.
themousemaster
Regular
Regular
Posts: 611
Joined: 10 Nov 2006, 16:54

Re: Projectile collision?

Post by themousemaster »

karmazilla wrote: I'm not talking about mobile targets, but stationary targets; buildings. (an shoting from emplacements)

The notorious inability to hit stationary targets on long distances is a bad thing, IMO. My observations say that they end up always hitting too short of the target - they have excellent precision in hitting the same spot over and over, it's just a shame that the target isn't at the spot they're hitting.

Try building a large battery of archies and have them fire at a target very far away, then observe your target - they'll only hit it by accident.
Oh, I was talking about loading some AF misle launchers on hover bodies, parking them, say, 4 screens away, and spotting with a sensor vehicle.  Gets towers every time.

As far as long-range accuracy vs buildings, I find that lateral shots (horizontal or vertical) are decent, but any type of diagonal angle screws up rocket artillery after about a 4-screen range.
User avatar
kage
Regular
Regular
Posts: 751
Joined: 05 Dec 2006, 21:45

Re: Projectile collision?

Post by kage »

karmazilla wrote: So watermelon, if you got a spare moment, then please look into giving the artillery a reasonable hit chance again. Although I really like how units can now dodge projectiles, It's a shame a side effect is that artillery on long distances now can't even hit stationary buildings.
i think this is one of those great oppurtunities to take wz in a different direction (while still providing an option to use the older system activated via mod conf files for stock warzone) -- artillery is extremely innaccurate, and it's the way it should be. the right thing to do would be to make the area of effect considerably larger, and make it do massive damage... if you move you own tanks through that, you'd be the only one to blame.
Post Reply