Skip to content

Optional replacement of short radar forward tick with dashed forward line#247

Open
Paula90 wants to merge 2 commits into
BZFlag-Dev:2.4from
Paula90:feature/radar_target_line
Open

Optional replacement of short radar forward tick with dashed forward line#247
Paula90 wants to merge 2 commits into
BZFlag-Dev:2.4from
Paula90:feature/radar_target_line

Conversation

@Paula90
Copy link
Copy Markdown

@Paula90 Paula90 commented Apr 10, 2020

  • 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 ;-)

@The-Noah
Copy link
Copy Markdown
Contributor

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

@Paula90
Copy link
Copy Markdown
Author

Paula90 commented Apr 10, 2020

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

bzflag_radar_line

@The-Noah
Copy link
Copy Markdown
Contributor

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

image

@Paula90
Copy link
Copy Markdown
Author

Paula90 commented Apr 10, 2020

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

@The-Noah
Copy link
Copy Markdown
Contributor

Ah that's right 🙂

@allejo allejo requested a review from blast007 April 13, 2020 18:25
@allejo
Copy link
Copy Markdown
Member

allejo commented Apr 13, 2020

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.

@blast007
Copy link
Copy Markdown
Member

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.

@macsforme
Copy link
Copy Markdown
Member

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

@Paula90
Copy link
Copy Markdown
Author

Paula90 commented Apr 14, 2020

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.

@macsforme
Copy link
Copy Markdown
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants