bzflag icon indicating copy to clipboard operation
bzflag copied to clipboard

Optional replacement of short radar forward tick with dashed forward line

Open Paula90 opened this issue 4 years ago • 10 comments

  • Draw a dashed line in radar in tank heading direction instead of small tick at radar border
  • Add GUI menu entry "Radar Forward Marker:" Tick/Line

... a big aiming aid for me ;-)

Paula90 avatar Apr 10 '20 17:04 Paula90

It would be nice to have a screenshot so we can see what it looks like without having to download and compile it.

The-Noah avatar Apr 10 '20 18:04 The-Noah

Sorry, my first contribution at all ... a little unexperienced ;-)

bzflag_radar_line

Paula90 avatar Apr 10 '20 18:04 Paula90

That's okay, I'm still new too :) It might be just me but it looks slightly off-centered.

image

The-Noah avatar Apr 10 '20 18:04 The-Noah

You're right, but isn't this natural? Given the center "square" (myTank) has an even pixel size, the dashed line cannot be exactly centered to this. From the code, it's just a longer version of the existing tick ;-)

Paula90 avatar Apr 10 '20 19:04 Paula90

Ah that's right 🙂

The-Noah avatar Apr 10 '20 19:04 The-Noah

Hmm... I'm not sure how I feel about this. For one, I would think this should be in a proto-break if this gets merged in; this feels like it's giving players with the most up to date client an unfair advantage in aiming. And on that note, I have my concerns that because it's providing aim assistance, that it'd be classified more like a cheat than a feature.

allejo avatar Apr 13 '20 18:04 allejo

There was a patch like this accepted into the 2.1 development branch back in 2006, except that it was a solid line instead of a dashed line. At a quick glance, I think this PR implements the drawing code better than the patch from 2006, but I'll have to take a closer look at it later.

However, I would also agree with @allejo that this should be added with a new major release of the game instead of a 2.4 compatible version.

blast007 avatar Apr 13 '20 18:04 blast007

According to the spec, GL_LINE_STIPPLE doesn't appear to be a valid argument to glPushAttrib(). Am I missing something?

macsforme avatar Apr 14 '20 06:04 macsforme

According to the spec, GL_LINE_STIPPLE doesn't appear to be a valid argument to glPushAttrib(). Am I missing something?

You're right, should be GL_LINE_BIT or GL_ENABLE_BIT right? Not sure from the spec whether there's a semantic difference in this case between both arguments.

Paula90 avatar Apr 14 '20 07:04 Paula90

The spec is a little confusing to me with respect to the terms "enable bit" versus "flag," but I would include both to be safe (e.g., glPushAttrib(GL_ENABLE_BIT | GL_LINE_BIT)). I don't see any downsides to using that approach in your proposed patch.

macsforme avatar Apr 14 '20 08:04 macsforme