-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add object crosshair and disable entity selectionboxes by default #9523
Conversation
Nice idea. |
Ok thanks. I'll remove that... |
Nice improvement! 🎉 Is the position of the texture off-center? I’d suggest that it be completely centered and then offsetted in the texture itself. This way makers can choose any position of the indicator by customizing the texture. |
Changed |
I like this, but I'm concerned about how obvious this would be to the user. The sword like thing in MC looks like an entity health bar? |
The sword is actually on the HUD most of the time, it displays the charge of the wielded tool. The plus icon below it only shows up when pointing at an entity. I guess I could have made it more clear |
Come to think of it, why not define this as an alternative crosshair feature altogether? Meaning, not add this indicator on top of the existing crosshair but instead replace it? |
Replace it with what? Most of the time you should be able to just cover it up, the selectionindicator is drawn after the crosshair is |
Do you mean: the crosshair changes shape when pointing at an entity? |
A setting for replacement could be added I guess |
I really like the concept :) But I have a dumb question: How is a selection indicator any less immersion breaking? I'm inclined to think it would be just as intuitive if not moreso if the crosshair simply changed shape to indicate that it's pointing to an entity or player. Having a dot showing the location of the entity almost seems like it would be more distracting than the selection box, esp. if the entity is moving. Either way, it's still nice change of pace, and I welcome anything that helps to improve the gameplay experience. |
The dot doesn't show the location of anything, it's just a dot above the crosshair that appears in the same place every time when the player can 'interact with'/'reach' an entity |
Ah, thanks for the clarification, I was under the impression it was centered on the entity. If it's simply being drawn above the crosshair, then I'm curious why not simply change the crosshair image itself? |
What would I change it to? Note: The default isn't an image, it's 2 lines drawn on the screen to form a '+' |
Yes. Regular crosshair would use |
The selectionindicator texture now replaces the crosshair. |
I have a suggestion for the form of the default selection indicator: Instead of a small solid-shaded square, use a small empty box formed by the same lines used to draw the crosshair. So 4 uses of |
I'm not sure it would indicate a selectionbox very well but I'm up for that once someone else comments, the box does seem a little intrusive |
I was actually going to suggest the exact same thing as paramat, but a diamond shape instead , just to make it even more distinctive. Although a square is perfectly fine by me as well. It's cool that I'm not the only one that was thinking along those same lines (no pun intended :) |
As long as the look is fully customizable I don’t care about the default look. |
I like the diamond idea, I think I'll do that tonight if nobody has any objections |
src/client/hud.cpp
Outdated
m_displaycenter.Y - (size.Y / 2)); | ||
driver->draw2DImage(selectionindicator, lsize, | ||
core::rect<s32>(0, 0, size.X, size.Y), | ||
0, selectionindicator_argb, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0, selectionindicator_argb, true); | |
nullptr, selectionindicator_argb, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That part is code I copied. Changed both the 'copied' and 'copied from' code
Co-authored-by: ANAND <ClobberXD@gmail.com>
Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
2c517f2
to
98e7407
Compare
Made all but one of the requested changes and also rebased this so I could run a |
@LoneWolfHT Thank you for the changes. I'll re-review/retest soon. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested.
Adds new object crosshair base pack texture
This is fine for me too. |
Goal of the PR
Add an indicator on the HUD to indicate when you are pointing at an entity. Similar to Minecraft's:
How does the PR work?
Replaces the default crosshair with a X when you are pointing at an entity
Comparison between HUD when pointing/not pointing at an entity:
The object crosshair is pretty much exactly like the regular crosshair in customization, it also uses the crosshair HUD flag to determine appearance
object_crosshair.png
object_crosshair_color
settingobject_crosshair_alpha
settingThis also disables entity selectionboxes by default
Does it resolve any reported issue?
Not a reported one, but @tacotexmex has been wanting entity selectionboxes removed for a while now.
Entity selectionboxes break immersion and are better suited for dev work IMO.
This PR will disable them by default without preventing players from knowing when they're pointing at an entity.
To do
This PR is Ready for Review.
How to test
I have tested all of the above without finding anything wrong