Grid Sage Forums

Grid Sage Forums

  • November 22, 2024, 02:53:58 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

LINKS: Website | Steam | Wiki

Author Topic: Translating cursor position when re-centrering the camera  (Read 2591 times)

R-26 Lightspeed

  • Sigix
  • ****
  • Posts: 332
    • View Profile
Translating cursor position when re-centrering the camera
« on: April 08, 2022, 10:40:26 AM »

[Mouse movement] Sometimes i move the camera around before making a move, and so when i do move by one tile the camera centers itself on Cogmind's new position but the cursor is left in it's old position, which is either on the side or the opposite way of where i want to go (I think it might have been the cause of a few misclicks when i didn't expect the camera to move so much, sometimes onto tiles with "truly" unstable ceilings).

My suggestion is an option to auto-move the cursor when changing position so the cursor is at the same location it was, relative to Cogmind.
It wouldn't be any different from moving when the camera is already centered, so it might feel more consistent/natural.
I do see an issue : by clicking on a tile that's too far away, the cursor would be moved out of the window. In those cases, one would probably not misclick or anything since it would take a bit for Cogmind to get there, so it might be best to not do anything in such cases?
Logged

Kyzrati

  • Administrator
  • True Cogmind
  • *****
  • Posts: 4477
    • View Profile
    • Cogmind
Re: Translating cursor position when re-centrering the camera
« Reply #1 on: April 12, 2022, 03:31:09 AM »

I'm having trouble envisioning this suggestion or how it really plays out, since the cursor already remains unmoved from its position when you are pathfinding to a target (since it's generally bad practice to move a user's cursor automatically).

Is your suggestion to... keep moving the cursor so that it's centered on the target cell as Cogmind is moving towards it? If so this would indeed be problematic for moving to cells outside the map view (and also even in cases when clicking on a cell in view but which is later shifted out of view due to the path), and therefore lead to inconsistent behavior in those cases, which would be kind of annoying.
Logged
Josh Ge, Developer - Dev Blog | @GridSageGames | Patreon

R-26 Lightspeed

  • Sigix
  • ****
  • Posts: 332
    • View Profile
Re: Translating cursor position when re-centrering the camera
« Reply #2 on: April 12, 2022, 09:57:46 AM »

Is your suggestion to... keep moving the cursor so that it's centered on the target cell as Cogmind is moving towards it?
(I feel like i'm bad at clarifying what i mean.) No, i meant moving the cursor so its position relative to Cogmind would stay the same.
For example, if i click on the tile right below Cogmind after the camera was moved, i'd like the cursor to be one tile below Cogmind after the move.
Currently, in that scenario, the cursor would have ended up far away from Cogmind, depending on how much the camera was moved. Had the camera already been centered on Cogmind before the move, the cursor would have been one tile below Cogmind after the move automatically.

I think i'll take screen to try to clarify what i mean.
« Last Edit: April 13, 2022, 10:12:25 AM by R-26 Lightspeed »
Logged

Kyzrati

  • Administrator
  • True Cogmind
  • *****
  • Posts: 4477
    • View Profile
    • Cogmind
Re: Translating cursor position when re-centrering the camera
« Reply #3 on: April 13, 2022, 01:18:16 AM »

Hm well that specific example does make it clearer (examples to illustrate are always good!). Overall this sounds somewhat convoluted? This feature seems like it would be a whole lot more work than it's worth...
Logged
Josh Ge, Developer - Dev Blog | @GridSageGames | Patreon

R-26 Lightspeed

  • Sigix
  • ****
  • Posts: 332
    • View Profile
Re: Translating cursor position when re-centrering the camera
« Reply #4 on: April 13, 2022, 10:11:27 AM »

Overall this sounds somewhat convoluted? This feature seems like it would be a whole lot more work than it's worth...
I'd think that depends on the architecture, like maybe it could be nearly as simple as moving the cursor by the same amount the camera is moved when originally recentering, except in reverse.
In any case, here are the screenshots : the first two are the before/after of what happens currently, and the next two are the before/after of what my suggestion is would happen.
Logged

Kyzrati

  • Administrator
  • True Cogmind
  • *****
  • Posts: 4477
    • View Profile
    • Cogmind
Re: Translating cursor position when re-centrering the camera
« Reply #5 on: April 13, 2022, 06:04:35 PM »

Yeah those images make it very clear, thanks. In practice a feature like this is much more complicated than it appears on the surface, would likely take at least several hours to complete. (If I listed all the requirements here you'd probably be surprised :P)
Logged
Josh Ge, Developer - Dev Blog | @GridSageGames | Patreon