itch.io is community of indie game creators and players

Efficient 4 direction control

Utilizing keycode as input parameter (and trigonometry), I am able to put 4 direction keystroke detection within single block of code

Keycode 37 = left arrow

Keycode 39 = right arrow

Keycode 40 = down arrow

Keycode 38 = up arrow

Leave a comment