lexys-labyrinth icon indicating copy to clipboard operation
lexys-labyrinth copied to clipboard

Always evaluate touch events relative to the center of the viewport

Open normanr opened this issue 3 years ago • 4 comments

When using touch events I find it tricky to navigate the player when the player is near the edge of the level because the place that needs to be touched to make the player move in the correct direction changes as they move away from the center of the viewport. I would prefer a mode where touch events are always evaluated relative to the center of the viewport. You could even have a small spot in the center that would just wait instead of moving the player (useful when in step mode).

normanr avatar Jun 04 '22 05:06 normanr

+1 this, been playing on mobile, and the number of times my selected player has taken the wrong step due to the directional touch navigation being relative to the player and not the viewport.

When lexy is on the rightmost side of map: "Oh you think you touched down? No you actually touched right"

(proceeds to step into water or push a block against a wall)

mruac avatar Dec 24 '22 23:12 mruac

Alternatively a swipe based touch navigation or a d-pad navigation would be great alternatives instead of this implementation

mruac avatar Dec 24 '22 23:12 mruac

It originally worked the way you're asking for, and I changed it because multiple players found it confusing :)

The problem is that both alternatives are wrong, depending on how you perceive the controls to work.

Given this positioning:

image

If you think you're touching a direction, then touching just left of the hint tile should of course move you left.

But if you think you're touching where you want to go, then touching just left of the hint tile should of course move you right — towards the hint tile.

I think the best option is probably a swipe that persists while you're holding your finger in place, but I don't know if that's readily discoverable? Also it's a bit more complicated.

eevee avatar Jan 12 '23 01:01 eevee

Swiping could be implemented with using the touch events, if a user ends the touch event after swiping, it can be translated into a move, and if the user swipes but does not end the touch event after a delay, then it can be interpreted as continual movement.

Something that help with the inspiration is the way how touch movements are interpreted in Baba Is You.

mruac avatar Jan 14 '23 08:01 mruac