crgimenes / neko

Neko is a cross-platform cursor-chasing cat. This is the reimplementation write in Go.
BSD 2-Clause "Simplified" License
414 stars 40 forks source link

Cat moves faster on diagonals #20

Open SondreDj opened 9 months ago

SondreDj commented 9 months ago

Movement is not normalized leading to faster movement on diagonals.

crgimenes commented 9 months ago

True. Maybe if we take the dimensions of the monitor and calculate the aspect ratio and then put the proportion in a variable to have the movement closer to 1 to 1...

crgimenes commented 4 months ago

https://www.youtube.com/shorts/0cYjreg7dpg

maybe this may give an idea to 'fix' it

The problem is that I must discover a way to normalize the displacement. As the coordinates are integers and we move one pixel at a time, I need to think of a way to normalize this without rounding the number.