Revolutionary-Games / Thrive

The main repository for the development of the evolution game Thrive.
https://revolutionarygamesstudio.com/
Other
2.83k stars 503 forks source link

Change Input Binding confusing to cancel #2359

Closed 84634E1A607A closed 3 years ago

84634E1A607A commented 3 years ago

Describe the bug

When you change your input binding the only way to cancel the change is to press ESC, making ESC unbindable. Currently "ui_cancel" is bound to ESC by default, then if you bind it to something else you cannot switch back.

Also the key binding cannot be canceled other than pressing ESC, then if you click somewhere trying to cancel it you get a conflict dialog.

The red cross to the right is a little confusing too. It means to delete the key binding instead of canceling the operation.

hhyyrylainen commented 3 years ago

This is not an issue because I decided that not being able to rebind ESC is a tradeoff we need to make. And this seems in my experience to be pretty common in games that ESC is the only key you can't rebind. Though I did notice one pretty bad bug: you can unbind ESC from an action (https://github.com/Revolutionary-Games/Thrive/issues/2362).

ESC can't really be used for binding because it is the only way to cancel an in-progress key rebinding. So ESC needs to be unrebindable for things to work. Otherwise we could not have a way to cancel rebinding a key.

84634E1A607A commented 3 years ago

I went to school and looked at that with some of my classmates. We still feel that we should cancel binding when the mouse clicks outside the button.

84634E1A607A commented 3 years ago

Or there might be someone who I didn't expect to press the ESC button, and then it went crazy clicking somewhere else, but it will never work.

hhyyrylainen commented 3 years ago

How would you bind the mouse click action then to placing things in the editor? It must be so that ESC is the only input action that can cancel the key rebinding. Others would be fiddly, like if mouse clicking would cancel it, then would you need to press on the "press any key" button with the mouse to bind the mouse to an action?

84634E1A607A commented 3 years ago

Some of the other keys will only be used in certain places. They may not be repetitive, like the left mouse button. it will only be used inside the Cell Editor and will not be used anywhere else. Not allowing such a piece to be set repeatedly can leads to confusion. (For example, if I want to change the E of launching toxin to the left mouse button, I can't change it. )

hhyyrylainen commented 3 years ago

(For example, if I want to change the E of launching toxin to the left mouse button, I can't change it. )

I was just going to say that it works, but apparently it doesn't due to a conflict. I'll open an issue.

Anyway my point is that the mouse buttons must be rebindable to actions the player wants.

84634E1A607A commented 3 years ago

Currently my thought is that key binding conflict dialog can be deprecated. Look at "Playerunknown's Battlegrounds" or some other games, they allow multiple key bindings. As long as the player tries to rebind, he is aware of its consequences, then a repetitive binding can be used to perform combined tasks.

hhyyrylainen commented 3 years ago

The keybinding groups are meant to be configured so that in the same context no duplicate keybinding can exist. For example you can't bind the same button to engulf and binding modes, that will just break the game and probably it'll be random which of those actions the button will perform.