thombruce / verse

🚀 A universe in progress
Other
8 stars 0 forks source link

Indicators #36

Closed thombruce closed 11 months ago

thombruce commented 11 months ago

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.

thombruce commented 11 months ago

Current issues:

[^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 commented 11 months ago

Indicator still stutters after c90950bbc9dbf95d85732d484967adf28a21ecaa 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 commented 11 months ago

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 commented 11 months ago

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.