[86.0] maxAngleDif effectively doubled

[86.0] maxAngleDif effectively doubled

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

[86.0] maxAngleDif effectively doubled

Post by Google_Frog »

In 85.0 maxAngleDif is the angle between the extremes of a weapon's arc. In 86.0 maxAngleDif is the maximum angle away from mainDir that a weapon can aim at. Effectively to update all values must be halved.

I added a unitdefs_posts fix in ZK as I'm waiting to see if the change is accidental or not. I didn't hear anything about it.
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: [86.0] maxAngleDif effectively doubled

Post by Kloot »

Now your gunships will jam again.
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: [86.0] maxAngleDif effectively doubled

Post by Google_Frog »

So... explain what is going on. If I had to take a wild guess it would be that you effectively doubled all maxAngleDifs instead of telling us to increase the maxAngleDif for gunships that jam.

I tested this and my unitdefs_post change does not produce gunship weapon jamming if I also double the maxAngleDif of the jammable gunships.
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: [86.0] maxAngleDif effectively doubled

Post by Beherith »

Thanks for the heads up, ill go half the angles for notair.
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: [86.0] maxAngleDif effectively doubled

Post by Kloot »

The variable is called "maxMainDirAngleDif" internally. That implies it is not supposed to be "the angle between the extremes of a weapon's arc" (as in 85.0) but exactly "the maximum angle away from mainDir", which is how 86.0 interprets it during targetting checks.
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: [86.0] maxAngleDif effectively doubled

Post by Google_Frog »

I don't really care how the value is interpreted as long as no functionality is lost. The functionality is unchanged and I think the new interpretation makes a bit more sense, that is how I assumed it worked when I first encountered it. So this is a notification for moddevs and a check to see if the change was intentional.

Doubled gunship maxAngleDif fixes jamming in 86.0 which may be important to others as well.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: [86.0] maxAngleDif effectively doubled

Post by FLOZi »

When did this change? Seems I documented it this way for the Unitdefs wiki page, oddly - seen as I can't find any branch that doesn't default to 360 :? .

TBH it seems going all the way back

http://springrts.com/phpbb/viewtopic.php?f=12&t=4012
Gnomre wrote:The cone is defined with "MaxAngleDif1=Degrees;" so if you wanted the weapon to only fire in a 60 degree arc, you'd put MaxAngleDif1=60;
zwzsg wrote:A 90 degree forward cone would look like:
WeaponMainDir1=0 0 1;//x:0 y:0 z:1 => that's forward!
MaxAngleDif1=90;//90° from side to side, or 45° from center to each direction
Das Bruce wrote:Firstly thats 45 degrees either way, cut it in half.
there are conflicting interpretations of how it works (Though I'd take gnome, and zwzsg's word any day)

I prefer 'I want a 90 degree arc, I set the value to 90'. It's the way S44's arcs have been set since at least 2008. Why change it after 4-6 years?

If the internal name is a big deal, surely it makes more sense to change that and not break every single game that uses it, and a history of documentation (However muddled it is - I will correct the UnitDefs page).
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7049
Joined: 16 Nov 2004, 13:08

Re: [86.0] maxAngleDif effectively doubled

Post by zwzsg »

FLOZi wrote:If the internal name is a big deal, surely it makes more sense to change that and not break every single game that uses it, and a history of documentation (However muddled it is - I will correct the UnitDefs page).
Have you no respect for our customs? It's not a proper Spring release if it doesn't introduce a change breaking every single game! The more subtle the bug, the merrier.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: [86.0] maxAngleDif effectively doubled

Post by smoth »

FLOZi wrote:
Gnomre wrote:The cone is defined with "MaxAngleDif1=Degrees;" so if you wanted the weapon to only fire in a 60 degree arc, you'd put MaxAngleDif1=60;
zwzsg wrote:A 90 degree forward cone would look like:
WeaponMainDir1=0 0 1;//x:0 y:0 z:1 => that's forward!
MaxAngleDif1=90;//90° from side to side, or 45° from center to each direction
Das Bruce wrote:Firstly thats 45 degrees either way, cut it in half.
there are conflicting interpretations of how it works (Though I'd take gnome, and zwzsg's word any day)

I prefer 'I want a 90 degree arc, I set the value to 90'. It's the way S44's arcs have been set since at least 2008. Why change it after 4-6 years?

If the internal name is a big deal, surely it makes more sense to change that and not break every single game that uses it, and a history of documentation (However muddled it is - I will correct the UnitDefs page).
wait, so my firearcs need to be adjusted? or it has been completely broken? I don't want to overreact but I really don't understand the change NOR will I have time to work on it. Sorry spring but my turtle is more important.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: [86.0] maxAngleDif effectively doubled

Post by FLOZi »

85 is the same way it has always been.

Google reports that (current) 86.0 has doubled arcs in comparison.

Help me lobby-lobby-lobby to have the change reverted.

Lobby lobby badger badger rabble rabble.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: [86.0] maxAngleDif effectively doubled

Post by hoijui »

+1 on having that change reverted.
User avatar
KingRaptor
Zero-K Developer
Posts: 838
Joined: 14 Mar 2007, 03:44

Re: [86.0] maxAngleDif effectively doubled

Post by KingRaptor »

I think it makes more sense the new way, and as far as breaking changes go it could have been a lot worse (this one can be fixed with 3 lines in unitdefs_post).

Documenting the change would have been nice though.
User avatar
SanadaUjiosan
Conflict Terra Developer
Posts: 907
Joined: 21 Jan 2010, 06:21

Re: [86.0] maxAngleDif effectively doubled

Post by SanadaUjiosan »

I vote to keep things as they were.

I personally loved that I could enter 180 and I knew exactly what it meant. So many things in Spring require little calculations to figure out what they really represent, it was nice to have something that wasn't like that :-)
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: [86.0] maxAngleDif effectively doubled

Post by smoth »

KingRaptor wrote:I think it makes more sense the new way, and as far as breaking changes go it could have been a lot worse (this one can be fixed with 3 lines in unitdefs_post).
I think it makes less sense. also, this would be fixing it with a kludge.

Is there an advantage to the change?
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: [86.0] maxAngleDif effectively doubled

Post by Forboding Angel »

hoijui wrote:+1 on having that change reverted.
+1 on your +1
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: [86.0] maxAngleDif effectively doubled

Post by FLOZi »

Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: [86.0] maxAngleDif effectively doubled

Post by Google_Frog »

I couldn't care less and would prefer fixes for things that cannot be simply worked around. Such as the shield graphics.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: [86.0] maxAngleDif effectively doubled

Post by KDR_11k »

FLOZi wrote:https://github.com/spring/spring/commit ... 55b0984ade
restore old weapon targetting-arcs
Good. If the internal name doesn't reflect the external behaviour then the name has to be changed, not the behaviour.
Post Reply

Return to “Game Development”