Skip to content
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

Indicators #36

Merged
merged 6 commits into from
Oct 6, 2023
Merged

Indicators #36

merged 6 commits into from
Oct 6, 2023

Conversation

thombruce
Copy link
Owner

closes #29

By submitting this pull request, you agree to follow our Code of Conduct: https://github.com/thombruce/.github/blob/main/CODE_OF_CONDUCT.md


Internal use. Do not delete.

  • Tests passing
  • Coverage sufficient
  • Manual review
  • No A11y regression
  • Translations provided or not needed

@thombruce
Copy link
Owner Author

thombruce commented Oct 6, 2023

Current issues:

  • There's only one indicator - generalise for all objects in space
  • Indicators stutters when X distance from object is zero1 (probably Y too)

Footnotes

  1. There are a few potential causes for this. We're using > rather than >=, which is easily amended. We're using max to compare two numbers, which appears to work only with integers? I see in the source for it that it just implements .max() which does work with floats, so I am swapping for that now. Lastly, we're sort of swapping coordinate systems at roughly 0 from a right of screen approach to a left of screen approach (absolute positioning, like CSS).

@thombruce
Copy link
Owner Author

Indicator still stutters after c90950b but the effect is less noticeable.

The > comparator does not matter, of course, since it will just return true or false - both accounted for. So the issue is with swapping from left-based to right-based positioning? Seems so...

Still, it is very, very good enough for now. Let's move on to generalising and putting more indicators on screen.

@thombruce
Copy link
Owner Author

Also looking for a way to colorise the indicator. CSS has a filter attribute but this doesn't seem to be implemented in Bevy. Some other way to do this?

@thombruce
Copy link
Owner Author

There is another issue with indicators. I now have two, and the one for the star appears accurate but the planetary indicator is pointing in the wrong direction at short distances...

It is as if the planet is on the visible rim of the star according to the indicator. (This might also account for why I couldn't find the star in #37 - maybe it was visible with some of my tweaks but was not where I thought it ought to be).

This isn't a major issue - when the planet and star are off screen, they appear accurate enough.

@thombruce thombruce merged commit 0349863 into main Oct 6, 2023
@thombruce thombruce deleted the feat/indicators branch October 6, 2023 05:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Minimap or UI indicators
1 participant