logoalt Hacker News

dangondtoday at 5:57 AM1 replyview on HN

Jump is keydown because many games let you adjust your jump height based on how long you hold down space after the jump starts.


Replies

flaunf221today at 9:39 AM

Games use keydown because it is more responsive and control responsiveness is vital to dynamic gameplay feeling good. There are some exceptions - if action can be charged, then it is on keydown. And then on gamepad sometimes actions are on release when developer has too many actions and not enough buttons, so it can be keyup vs hold.