I have a game that can be played in your browser. It's a retro game (multiplayer snake) and the menus and your snake can only be controlled using your keyboard. Mouse input is ignored.
I was using the Esc key to cancel all sorts of actions, like cancelling a confirm popup, going back a step in a menu, exiting a game, cancelling focus on an input field.
The problem is that my game supports html5 fullscreen mode, and browsers will exit fullscreen mode when Esc is pressed. I cannot override that because of browser security.
At first, I thought I would just use both Backspace and Delete to trigger a cancel action, and promote these keys in the initial instructions. Problem is that these keys already have a function when an input field is focused, so I need something else to cancel that.
Also, I'm afraid users will use Esc anyway because they expect it to cancel things. So maybe I should support it when not in fullscreen, and add an alert popup when entering fullscreen that Esc will now exit fullscreen mode and you must use some other key for cancelling. But changing the keyboard layout halfway is not ideal.
I could also skip fullscreen mode entirely because Esc is essential for a good UX of the game and there is no acceptable workaround.
How would you solve this?
Answer
Training users to do something different than in the usual way is extremely hard to do. This might be especially true in a computer game where the actions are less thought-through and often reflex-like.
So you'd run into problems even if you laid the Esc
functions on a different key. Users still would expect the confirm popup to close and might get confused if they exit fullscreen instead. This can get really frustrating if this happens multiple times.
As I can't give you implementation hints how to hack around this problem, the only possibility I see is what you have already suggested:
I could also skip fullscreen mode entirely because Esc is essential for a good UX of the game and there is no acceptable workaround.
No comments:
Post a Comment