Rewrite PlayerPiece logic to make gameplay smoother

#2 · closed · 1 comments

View on GitHub ↗

fishies

Currently when the player selects a direction to turn, input is locked until the next frame. Therefore at times the game's controls will feel unresponsive. The proposed solution is to replace input locking with a Direction variable that always accepts input deciding what direction the snake will turn in the next step (so actual direction change is not processed until the start of the next frame).

Comments

fishies

Implemented in ceb498b77ce56e4b2ad5b28c684b5dd082140f3d.