Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decouple key press into keyup and keydown #41

Open
drofp opened this issue Oct 4, 2020 · 1 comment
Open

Decouple key press into keyup and keydown #41

drofp opened this issue Oct 4, 2020 · 1 comment
Labels
enhancement New feature or request nontrivial Not exactly a quick fix...

Comments

@drofp
Copy link
Owner

drofp commented Oct 4, 2020

This will allow the character to move faster than the keyboard's refresh rate. Notice if you hold down left or right, the character changes in position at the same rate your keyboard would repeat a letter in a text editor if you held down the key for that letter.

After talking with a few test players and friends, it seems like the solution is to decouple wgetch() into KeyDown() and KeyUp() event handlers.

This is a supposedly a non-trivial task when fetching this information from a terminal:

Some implications:

  • we will probably have to run as sudo
  • we may need to make a different version for each OS, or each family of OS (Linux distros, MacOS, Windows)
@drofp drofp added enhancement New feature or request nontrivial Not exactly a quick fix... labels Oct 4, 2020
@drofp
Copy link
Owner Author

drofp commented Oct 4, 2020

Another option for this is to just remake this game from scratch with a graphics library that actually interfaces with the machine's display, and then just drawing pixel art to make fake terminal-like graphics.

A few cross-platform options that might work are Vulkan and Pygame

If we decide to go down this route, we could go as crazy as we wanted with the art and just sink a bunch of time into making this look nice. Check out:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request nontrivial Not exactly a quick fix...
Projects
None yet
Development

No branches or pull requests

1 participant