Why does AvoidFeature default to true?

Why does AvoidFeature default to true?

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
Godde
Posts: 268
Joined: 29 Mar 2010, 17:54

Why does AvoidFeature default to true?

Post by Godde »

Recently cannon weapons and I missile weapons can determine if their Line of Fire is blocked by features.

Great! Another great feature to include in games.

But why does it default to true?
It changes gameplay.

There are also somebugs concerned with cannon balls and propaby missiles aswell. Even if the feature is nonblocking, so that projectiles and lasers can pass through, the cannon weapon will not fire through it and reject to fire.
Laserweapons will fire through thoose features without hesitation.

Innaccurate weapons, like on the Vulcan in NOTA, might be unable to force fire into the ground just because there is a little debris near the target location.

The custom hitspheres is different from the ones that Line of Fire calculation use. This can cause huge problems for cannons to fire through forests even if the features are nonblocking features that have really tall but very thin custom cylinders for example
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Why does AvoidFeature default to true?

Post by smoth »

Godde wrote:Recently cannon weapons and I missile weapons can determine if their Line of Fire is blocked by features.
WHAT?!?! IT IS FIXED FUCK YES!
Godde wrote:But why does it default to true?
It changes gameplay.
for the better, if the mod wants the old behavior they can set it up in weapon defs post.
Godde wrote:There are also somebugs concerned with cannon balls. Even if the feature is nonblocking so that projectiles and lasers can pass through the cannon weapon will not fire through it and reject to fire.
Laserweapons will fire through thoose features without hesitation.

Innaccurate weapons, like on the Vulcan in NOTA, might be unable to force fire into the ground just because there is a little debris near the target location.
I don't follow this part.
Godde wrote:The custom hitspheres is different from the ones that Line of Fire calculation use. This can cause huge problems for cannons to fire through forests even if the features are nonblocking features that have really tall but very thin custom cylinders for example
this causes all kinds of annoying problems.. like units not being able to shoot over large flat buildings. Something that makes me rage in grts.
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: Why does AvoidFeature default to true?

Post by Pxtl »

Wait, does this mean that Kodachi's won't point-blank their shots into an occluding wreck and self-pwn while trying to hit a target on the far side? That Samsons won't shoot missile after missile into one goddamned wreck? Epic.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Why does AvoidFeature default to true?

Post by smoth »

Pxtl wrote:Wait, does this mean that Kodachi's won't point-blank their shots into an occluding wreck and self-pwn while trying to hit a target on the far side? That Samsons won't shoot missile after missile into one goddamned wreck? Epic.
yes, I believe that is what he is indicating, but there is an issue.

Ok I talked to godde:

Here is the problem, we have some features set to be non-blocking. Non-blocking features are STILL AVOIDED.. meaning a nonblocking set wreckage still obeys avoid feature. This is undesired. if a feature is nonblocking, it should be ignored for all targeting. Clearer?
Godde
Posts: 268
Joined: 29 Mar 2010, 17:54

Re: Why does AvoidFeature default to true?

Post by Godde »

Yeah! That's right.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Re: Why does AvoidFeature default to true?

Post by FLOZi »

Godde wrote:Recently cannon weapons and I missile weapons can determine if their Line of Fire is blocked by features.

Great! Another great feature to include in games.
As Smoth said, long term desired fix. :mrgreen:
But why does it default to true?
It changes gameplay.
Agree with Smoth here actually. It was always intended to be true for S44, btw. :P
There are also somebugs concerned with cannon balls and propaby missiles aswell. Even if the feature is nonblocking, so that projectiles and lasers can pass through, the cannon weapon will not fire through it and reject to fire.
Laserweapons will fire through thoose features without hesitation.
smoth wrote:Here is the problem, we have some features set to be non-blocking. Non-blocking features are STILL AVOIDED.. meaning a nonblocking set wreckage still obeys avoid feature. This is undesired. if a feature is nonblocking, it should be ignored for all targeting. Clearer?
I reported this issue to jk the other day who had been unaware of it, no doubt it's on his todo list (seems 1 out of 5 checks is wrong)
The custom hitspheres is different from the ones that Line of Fire calculation use. This can cause huge problems for cannons to fire through forests even if the features are nonblocking features that have really tall but very thin custom cylinders for example
Not sure on this one.
Last edited by FLOZi on 24 Jan 2012, 21:15, edited 2 times in total.
Godde
Posts: 268
Joined: 29 Mar 2010, 17:54

Re: Why does AvoidFeature default to true?

Post by Godde »

smoth wrote:
Godde wrote:But why does it default to true?
It changes gameplay.
for the better, if the mod wants the old behavior they can set it up in weapon defs post.
I would agree with you but now it avoids non-blocking features, which we both agree is undesirable.
Godde
Posts: 268
Joined: 29 Mar 2010, 17:54

Re: Why does AvoidFeature default to true?

Post by Godde »

FLOZi wrote:
The custom hitspheres is different from the ones that Line of Fire calculation use. This can cause huge problems for cannons to fire through forests even if the features are nonblocking features that have really tall but very thin custom cylinders for example
Not sure on this one.
Custom collision volumes is abit buggy as I have seen in my testing.
I were writing a mantis ticket but then I took an arrow to the knee.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Why does AvoidFeature default to true?

Post by hoijui »

Godde wrote:but then I took an arrow to the knee.
so first they go looking for indians in america, and now you sain they in sweden?!?
what smoking?
who shoots at a guy while he is writing a mantis ticket? thats like shooting in the back squared.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Why does AvoidFeature default to true?

Post by smoth »

there is this archer, I don't know who he is, bastard has impeccable timing I was going to stop him...
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Re: Why does AvoidFeature default to true?

Post by FLOZi »

[22:01:16] <[LCC]jK> I made that change already days ago when we noticed it
[22:01:40] <[LCC]jK> just didn't pushed it cause of the still unfinished LineGroundCol fix
https://github.com/spring/spring/commit ... 910d0499c5

https://github.com/spring/spring/commit ... 756571bc82

The system works! :shock:
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Why does AvoidFeature default to true?

Post by smoth »

Jk has great knee armor.
User avatar
Johannes
Posts: 1265
Joined: 17 Sep 2010, 15:49

Re: Why does AvoidFeature default to true?

Post by Johannes »

Whether it has bugs or not, wouldn't the old behavior be a better default? I and I think most other players too would rather read about major changes to gameplay from a games changelog than from the engineversions log.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Why does AvoidFeature default to true?

Post by smoth »

Johannes wrote:Whether it has bugs or not, wouldn't the old behavior be a better default?
Nope it isn't better, it is a flawed behavior. The old behavior can be setup in weapondefs_post if they want such flaws in their project.
Johannes wrote: I and I think most other players too would rather read about major changes to gameplay from a games changelog than from the engineversions log.
I was not joking when I already said the old behavior can be replicated with a VERY small lua change.

you know, like I said here:
smoth wrote:
Godde wrote:But why does it default to true?
It changes gameplay.
for the better, if the mod wants the old behavior they can set it up in weapon defs post.
User avatar
Johannes
Posts: 1265
Joined: 17 Sep 2010, 15:49

Re: Why does AvoidFeature default to true?

Post by Johannes »

I don't care if anyone considers which behavior to be better or worse, or however flawed either mode can be considered, the main thing is that the old behavior should remain the default just for the sake of it being the behaviour people are used to, both devs and players.

If you retain the old behaviour all current games have been designed around as the default, it's still a small change to switch to the new mode in that case too... And then it is a concious change by the game developer instead of something that just suddenly appeared from the engine devs to mingle the game up. It is a signal to the players too that this or that has changed, and it's indeed intended to be in the game I play by the people who develop that game.


And the new behaviour does have its primal flaws, it's not just about making the units smarter (which ofc isn't always desirable either).
For example, units fighting in an area with trees - trees which go down in 1 hit, but will absorb that 1 hit before going down. If 2 opposing units, both on hold position, are facing each other within range of their guns, and there's a tree in between... They'll just stand idle and wait for the player to forcefire that tree down before they'll engage each other. Or if they are on maneuver, they'll walk forward until one knocks down that tree by walking over it, which can mean wandering into the range of enemies that you would've otherwise pounded from afar after shooting down that damn tree.
That's just 1 quickly thought up and tested scenario where the new behavior makes units behave dumber than before, surely it's not the only one.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Why does AvoidFeature default to true?

Post by smoth »

No I am sorry but that logic is fundamentally flawed. If you want the old behavior as default. Pester the game devs of your favorite game.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Why does AvoidFeature default to true?

Post by smoth »

talking with godde, ok, lets consider this:

Current games
- certain weapons avoid features others do not.

Engine fix
- All weapons avoid features.
- This resolves a consistency issue with the engine.

But I want my weapon to not avoid features! There is a tag for that. The default is TRUE.
AvoidFeature This makes the weapon avoid features while targetting (the shoot will still collide with features). Can be 1 or 0.
this means all weapons should avoid features by default.

-----------------------------------------------------------------
set 1)
Argument: this will break gameplay.

Counterargument: not if the game dev doesn't want it to. The game dev can set the weapons to not avoid features for specific weapons or use weapondefs_post to counteract this..

Counter-Counterargument: well have the other games set the tag correctly...... oh wait it is already set to avoid friendly.
-----------------------------------------------------------------
set 2)
Argument: the games already took this into the equation.

CounterArgument: They can still have this functionality, if they edit weapondefs_post or the respective weapon files.
-----------------------------------------------------------------
set 3)
Argument: but it is the behavior assumed by the content devs.
CounterArguement: that's a nice assumption of your own, this isn't the case, it is something that we have been force to deal with.


It is important to understand that as things are now, weapons will avoid features based on their class. Without the ability to choose, weapons that do not avoid features cannot have this changed to avoid features. By setting a consistent for all weapons setting. you get the ability to turn it on or off.

You can argue that weapons should all not avoid features. Well that is nice but then that means the majority of weapons will now try and shoot through features they cannot shoot through...
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: Why does AvoidFeature default to true?

Post by Google_Frog »

I don't care what the default is as long as the ability to customise is there.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Why does AvoidFeature default to true?

Post by smoth »

The main issue that godde was talking about was fixed by jk already.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Why does AvoidFeature default to true?

Post by Forboding Angel »

Pxtl wrote:Wait, does this mean that Kodachi's won't point-blank their shots into an occluding wreck and self-pwn while trying to hit a target on the far side? That Samsons won't shoot missile after missile into one goddamned wreck? Epic.
Dude... there is a gadget in zk called "noselfpwn.lua" 3 guesses as to what it does.
Post Reply

Return to “Engine”