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

Instant combat input response with keyboard module. #70

Open
Vesper-arch opened this issue May 21, 2024 · 0 comments
Open

Instant combat input response with keyboard module. #70

Vesper-arch opened this issue May 21, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@Vesper-arch
Copy link
Owner

Basically, no more input().

The process of typing something and pressing enter to do anything with player input is slow and I want the game to have a similar speed to true Slay the Spire.

How?

This took me a bit of researching to decide but I will be using the keyboard module to listen for keyboard inputs.
The reason I chose this over pynput is primarily because it relies on an X11 server to be running on Linux. Since I am using WSL for development at the moment, pynput is unable to run due to the fact that WSL only runs in the terminal(Except with X11 forwarding) and there is no display server running.

Yes, this does mean you will need sudo to run this on Linux

I figure this is a worthwhile tradeoff to being literally unable to play the game on my own machine.

Here is a Stack Overflow post detailing both libraries as solutions for listening for keyboard input in Python.

The days of input() will be over soon.

@Vesper-arch Vesper-arch added the enhancement New feature or request label May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

1 participant