drofp/RoadRun

Use display+timer refresh rate

Closed this issue · 1 comments

drofp commented

Overview

Currently, the refresh rate of key inputs is determined by the keyboard refresh rate, which makes the gameplay choppy and sometimes incorrect (e.g. try to hold down left or right when playing, or change direction quickly). Change this implementation to use the refresh rate of the display rather than the refresh rate of the keyboard.

Things to note/look out for

  • This will probably involve replacing the key macros here with key pressed/released events. This is not natively possible with ncurses (or for terminals in general), but some people have found workarounds.
  • This may provide some insight.
  • The player's character will probably need some sort of timer so it doesn't instantly jump to the leftmost or rightmost side of the screen.
  • This feature may limit portability if it requires going through the OS-specific window manager API.
drofp commented

Duplicate of #41