Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualDemion

Posted 14 March 2014 - 08:43 AM

Log from first program - pastebin

It is rarely 100 milliseconds but often within 25-50 milliseconds, which is 1 or 2 frames (using VSync 60 fps, ~ 16 ms per frame) which already leads to unwanted result (game logics changes direction, animation frame (angle) etc).

 

So only solution I see so far is using raw input (which is subjectively a little bit faster) instead of wm_keydown / up and process input in game with periodic delay (once per 2-5 frames instead of every frame) to avoid unwanted results.

 

According to stackoverflow delays of the order of 50 ms or so are common in processing key presses through the normal Windows message queue.

 

Thanks for effort anyway. I am still looking for any better solutions.


#1Demion

Posted 14 March 2014 - 08:42 AM

Log from first program - pastebin

It is rarely 100 milliseconds but often within 25-50 milliseconds, which is 1 or 2 frames (using VSync 60 fps, ~ 16 ms per frame) which already leads to unwanted result (game logics changes direction, animation frame (angle) etc).

 

So only solution I see so far is using raw input (which is subjectively a little bit faster) instead of wm_keydown / up and process delayed input (once per 2-5 frames instead of every frame).

 

According to stackoverflow delays of the order of 50 ms or so are common in processing key presses through the normal Windows message queue.

 

Thanks for effort anyway. I am still looking for any better solutions.


PARTNERS