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

Adding Quick Reverse Key to Hexen / Heretic #1240

Merged
merged 3 commits into from
Nov 23, 2024

Conversation

Noseey
Copy link

@Noseey Noseey commented Nov 22, 2024

Related Issue:
Closes #1239

Change Summary

  • Adding Quick Reverse Button (mouse and keyboard) to Heretic and Hexen.

Adding Quick-Reverse Key and Mouse Input for Hexen and Heretic by copying the implementation from Doom.
Introduced state variable to only allow a 180° Turn once per button press (either mouse or keyboard). This improves the useability when binding it to a mouse key.
@fabiangreffrath
Copy link
Owner

  • Improving turn Button behavior in all three games (Doom, Heretic, Hexen) by only turning once per press. (especially for mouse-bound quick reverse, this will be helpful)

Thank you, but I don't understand why the previous approach of resetting the corresponding mouse and button states doesn't work?

@Noseey
Copy link
Author

Noseey commented Nov 22, 2024

Thank you, but I don't understand why the previous approach of resetting the corresponding mouse and button states doesn't work?

It works mostly, as it skips further inputs until updates are done. For keyboard, this is negligible, as you would need to actively hold down the key to provoke further turns. For mouse-bound quick reverse, I did some testing with a mouse-thumb button and noticed that when turning, any slight mouse-movement causes subsequent turns. At least for me, it was difficult to use the quick reverse that way.

@Noseey
Copy link
Author

Noseey commented Nov 22, 2024

I had some further thoughts about it and I think what I'm seeing e. g. in the case of the quick reverse key input is the typical keyboard interrupt behavior on my hardware and OS. The first interrupt is sent "immediately" when pressing the key, while when holding the key, after ~1s the long-press triggers continual interrupts. This is why I don't notice it practically when playing, as I rarely press and hold the quick reverse key for that long. I suspect, it differs from OS and Hardware, maybe you are seeing something different here.

As for the mouse, I suspect that the interrupts when moving it causes also the button state to refresh. This behavior could also differ with OS and Hardware. But that is just some speculation here, I didn't analyse it.

@Noseey
Copy link
Author

Noseey commented Nov 23, 2024

As there seems to be other buttons affected by this aswell, I would propose the following:
I will roll back the improved behavior for this PR and instead create a new open issue to summarize my observations there and to allow for a separate discussion on the topic. What do you think?

@fabiangreffrath
Copy link
Owner

Yes, please. I was about to suggest something similar anyway.

@Noseey Noseey changed the title Adding Quick Reverse Key to Hexen / Heretic and improve button behavior Adding Quick Reverse Key to Hexen / Heretic Nov 23, 2024
Copy link
Owner

@fabiangreffrath fabiangreffrath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@fabiangreffrath fabiangreffrath merged commit bd87fce into fabiangreffrath:master Nov 23, 2024
6 checks passed
@Noseey Noseey deleted the Hex_Her_Quick_Reverse branch November 29, 2024 23:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Suggestion] Heretic/Hexen: Quick Reverse Key
2 participants