View topic - [86.0] maxAngleDif effectively doubled



All times are UTC + 1 hour


Post new topic Reply to topic  [ 18 posts ] 
Author Message
PostPosted: 27 Feb 2012, 08:27 
Moderator

Joined: 12 Oct 2007, 08:24
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.


Top
 Offline Profile  
 
PostPosted: 27 Feb 2012, 14:03 
Spring Developer

Joined: 08 Oct 2006, 15:58
Now your gunships will jam again.


Top
 Offline Profile  
 
PostPosted: 27 Feb 2012, 14:33 
Moderator

Joined: 12 Oct 2007, 08:24
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.


Top
 Offline Profile  
 
PostPosted: 27 Feb 2012, 15:29 
Moderator
User avatar

Joined: 26 Oct 2007, 15:21
Thanks for the heads up, ill go half the angles for notair.


Top
 Offline Profile  
 
PostPosted: 27 Feb 2012, 15:30 
Spring Developer

Joined: 08 Oct 2006, 15:58
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.


Top
 Offline Profile  
 
PostPosted: 27 Feb 2012, 15:38 
Moderator

Joined: 12 Oct 2007, 08:24
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.


Top
 Offline Profile  
 
PostPosted: 27 Feb 2012, 18:10 
Moderator
User avatar

Joined: 29 Apr 2005, 00:14
Location: #moddev - join it!
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

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


Top
 Offline Profile  
 
PostPosted: 27 Feb 2012, 18:45 
Kernel Panic Co-Developer
User avatar

Joined: 16 Nov 2004, 13:08
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.


Top
 Offline Profile  
 
PostPosted: 27 Feb 2012, 19:01 
Content Developer
User avatar

Joined: 13 Jan 2005, 00:46
Location: ModalitÃ
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.


Top
 Offline Profile  
 
PostPosted: 27 Feb 2012, 19:06 
Moderator
User avatar

Joined: 29 Apr 2005, 00:14
Location: #moddev - join it!
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.


Top
 Offline Profile  
 
PostPosted: 27 Feb 2012, 20:11 
Spring Developer
User avatar

Joined: 22 Sep 2007, 08:51
+1 on having that change reverted.


Top
 Offline Profile  
 
PostPosted: 27 Feb 2012, 20:16 
Zero-K Developer
User avatar

Joined: 14 Mar 2007, 03:44
Location: Fillydelphia
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.


Top
 Offline Profile  
 
PostPosted: 27 Feb 2012, 21:27 
Conflict Terra Developer
User avatar

Joined: 21 Jan 2010, 06:21
Location: Tucson
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 :-)


Top
 Offline Profile  
 
PostPosted: 28 Feb 2012, 00:54 
Content Developer
User avatar

Joined: 13 Jan 2005, 00:46
Location: ModalitÃ
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?


Top
 Offline Profile  
 
PostPosted: 28 Feb 2012, 01:48 
Evolution RTS Developer
User avatar

Joined: 17 Nov 2005, 02:43
Location: Raegquitting Spring on 04/24/12
hoijui wrote:
+1 on having that change reverted.

+1 on your +1


Top
 Offline Profile  
 
PostPosted: 28 Feb 2012, 08:14 
Moderator
User avatar

Joined: 29 Apr 2005, 00:14
Location: #moddev - join it!
https://github.com/spring/spring/commit ... 55b0984ade

Quote:
restore old weapon targetting-arcs


Top
 Offline Profile  
 
PostPosted: 28 Feb 2012, 08:21 
Moderator

Joined: 12 Oct 2007, 08:24
I couldn't care less and would prefer fixes for things that cannot be simply worked around. Such as the shield graphics.


Top
 Offline Profile  
 
PostPosted: 28 Feb 2012, 18:41 
Game Developer
User avatar

Joined: 25 Jun 2006, 07:44
Location: Germany
FLOZi wrote:
https://github.com/spring/spring/commit/a0851f668958f9a96b6431c2845d2d55b0984ade

Quote:
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.


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Site layout created by Roflcopter et al.