open2jamorg / open2jam

open source o2jam emulator
open2jam.wordpress.com
Artistic License 2.0
109 stars 40 forks source link

get real time from key presses #3

Closed chaosfox closed 11 years ago

chaosfox commented 13 years ago

Right now the time used for the key presses is the time we check them, there is a way to get the real time the key was pressed but to use it we have to change the current way we check for key presses to pooling the keyboard.

By pooling the keyboard we can get the real time the key was pressed and with that update the game state with these real times instead the time we checked which could have different spans of time depending on the player fps.

Reference: http://lwjgl.org/wiki/index.php?title=LWJGL_Basics_2_(Input)

mrcdk commented 13 years ago

Should be done by now, when you can merge with master

chaosfox commented 13 years ago

its a bit unstable still, on linux, sometimes java die with this: java: xcb_io.c:140: dequeue_pending_request: Assertion `req == dpy->xcb->pending_requests' failed.

and I am not sure why but I think there's a race condition between the threads..( also strange, seems to only happen on fullscreen)

Decided to ask help on the lwjgl forums: http://lwjgl.org/forum/index.php/topic,4073.0.html

chaosfox commented 11 years ago

nothing came out of this so I am going to close this issue