Ad
  • Custom User Avatar

    That is also what irritated me. It would make more sense if you could move if the direction is already correct.
    The code would have been so much clear without that case...

  • Custom User Avatar

    During the first "frame" when a new key is pressed the direction doesn't matter at all, it is just updated as I stated on point 1 (I didn't emphasize that but I never said you should skip the direction update and go straigth to the movement).
    So when I set the starting direction to 8 I just assign an arbitrary default value, which is irrelevant to the rest of the code and could be any other direction, since it is updated on the first frame anyway.