snek icon indicating copy to clipboard operation
snek copied to clipboard

Movement logic is weird against walls, might need a fix.

Open flukeout opened this issue 8 years ago • 2 comments

Steps to reproduce

  • Go north directly along the right side wall
  • Tap right to start turning right
  • Immediately you will start losing segments, while staying still
    • Makes sense you're turning right into a wall
  • The snake still appears as a straight vertical column
  • Press left
  • Nothing happens, the snake continues to lose segments

I think the expectation here is that you should be able to turn left, because your snake is in a vertical column so a left move doesn't look 'invalid'. However with our logic, I think that the snake thinks it's going right (into the wall) so it prevents a 'left' command from having an effect because you shouldn't be able to reverse directions.

flukeout avatar Sep 25 '16 01:09 flukeout

technically a consequence of "turning into the wall": your snake is now turning right, into the wall, so pressing up would solve it, but it's hard to tell our snake's facing right, not up, now (the same happens on the other walls: moving along bottom and hit down = death, you can press the direction you were going in before to get back to being alive).

Though in all cases once you're only 1 segment long, going the opposite direction will work since you no longer have a tail that can get in the way.

Pomax avatar Sep 25 '16 23:09 Pomax

Oh yeah, the scneario is totally 'valid' from our snake logic point of view - it just feels weird "why can't I turn left when i usually can from this snake position). Losing control is frustrating, especially since the consequence is so severe! Let's let it sit a bit maybe we'll come up with something.

flukeout avatar Sep 26 '16 16:09 flukeout