I know its possible but I cant seem to figure it out. In its basic form I have a canvas circle moving 5 pixels every key event however this seems to be rather slow at firing and really jumpy, plus it stalls when changing key or changing from rapid key press to holding down.
So can someone enlighten me of a way ofwhich this could work without it stuttering?
Thanks.
What you want to do is set variables on
keydownandkeyupto true or false that you check every tick. Something like this: