anotherworld icon indicating copy to clipboard operation
anotherworld copied to clipboard

Movement 'stutter' on held keypress

Open matt-dray opened this issue 3 years ago • 1 comments

I think my keypress is interrupted if I hold it down. For example, in this clip I hold down the down-arrow key and would expect the player to remain crouched, but there is some bouncing as though the key is cancelled and then re-recognised. Weirdly this results in the player doing a crouching moonwalk.

anotherworld-bounce

Session info
R version 4.2.0 (2022-04-22)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 11.6.7

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib

locale:
[1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8

attached base packages:
[1] grid      stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] purrr_0.3.4     magrittr_2.0.3  nara_0.1.0      eventloop_0.1.1

loaded via a namespace (and not attached):
[1] compiler_4.2.0 R6_2.5.1       cli_3.3.0      tools_4.2.0    audio_0.1-10   rlang_1.0.2   

matt-dray avatar Jul 27 '22 13:07 matt-dray

Related to #3

It could be a limitation of they key capturing in {grDevices} events (in which case it's unfixable), or maybe I'm doing something askew in {eventloop}.

I may just need to revisit handle_input() in game.R

coolbutuseless avatar Jul 27 '22 13:07 coolbutuseless