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

add ability to switch to planet by clicking on it from afar #9903

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

Sivecano
Copy link

@Sivecano Sivecano commented May 31, 2024

If your pull request is not translation or serverlist-related, read the list of requirements below and check each box:

  • I have read the contribution guidelines.
  • I have ensured that my code compiles, if applicable.
  • I have ensured that any new features in this PR function correctly in-game, if applicable.

This sometimes bothered me when looking at the map.
Just let me click on a thing to get there instead of having to figure it out via menu.
Now I am happy.

I outlined the function gotoPlanet but I'm unsure if this was the correct thing to do styleguidewise.

SCOPE EXPANDED: we're also doing smooth transitions now ig

@Twcash
Copy link

Twcash commented May 31, 2024

interesting

@Sivecano
Copy link
Author

Tested on Desktop and Android, maybe one would want to add a highlighter to the currently hovered planet but maybe it's actually just fine as-is

@Sivecano
Copy link
Author

I'm unsure about 3 things:

  • Is it a good idea to outline gotoPlanet?
  • is the introduction of hoverPlanet a good idea
  • if yes, should it be highlighted somehow?

@Sivecano
Copy link
Author

Sivecano commented May 31, 2024

do not merge this for now it breaks selecting sectors to play. will fix
I fixed it, it's fine now

@Sivecano
Copy link
Author

mindustry.mp4

@Sivecano
Copy link
Author

Sivecano commented Jun 1, 2024

mindustry2p.mp4

@Sivecano
Copy link
Author

Sivecano commented Jun 1, 2024

so the big issue I'm having is that I'm faced with a few choices:

  • go on as before and set the camera position relative to the camera to something fixed: this does not feel very natural
  • keep the same relative camera position: this feels great especially when clicking on planets directly but when choosing planets from the list it can cause you to clip backwards through a planet this is jerky as hell.
  • turn the camera to face the new planet: this works pretty well especially for long zooms but is awful when selecting something like a moon or frankly anything that is not far away
    what can I do:
  • make some sort of case distinction
  • choose one of the above
  • figure out a more complicated approach path preferably one with a higher arc this would be epic but hard

@Sivecano
Copy link
Author

Sivecano commented Jun 1, 2024

this also fixes a segfault when selecting a planet without any sectors (this happens with some misconfigured mods)

@Anuken
Copy link
Owner

Anuken commented Jun 1, 2024

I'm not going to review this yet, but your style is wrong. Read the guidelines.

@Sivecano
Copy link
Author

Sivecano commented Jun 2, 2024

I'm not going to review this yet, but your style is wrong. Read the guidelines.

thanks, I'll look over it. I though I kept most of it in mind but apparently I messed up. my bad

@Sivecano
Copy link
Author

Sivecano commented Jun 2, 2024

ran the formatter over my changes and I hope it's serviceable now. The only style thing I'm sorta unsure about is the addition of gotoPlanet. I wanted changing planet to have consistent behaviour but maybe that's not actually what we want to begin with.

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.

None yet

3 participants