Advertisement

Hotkeys

Started by December 04, 2011 11:36 PM
2 comments, last by Stroppy Katamari 13 years, 1 month ago
Running various ideas through my head, the thought of control layout came to mind ... as I'm brainstorming an open world RPG the likes of hotkeys/quickkeys (keys you can manually link to a specific ability, item) and how many there should be, if to split them between varying types.

My current idea of a system is as follows.

One mechanic inspired by old graphical roguelikes was a number of item quick-slots depending on what belt your wearing, I think Diablo may also do something in this vain?

1 slot for beltless individual, 2 for a basic belt, up to 5 the best belt (keys 1 to 5).

Keys 6 to 0 are than set aside for quick-slots dedicated to spells, abilities and gestures (like those in Fable) .... this seems alot for just 5 keys, so I considered either some kind of context sensitive layouts (target over a friendly individual and you'll have your 'Social' quick-slots pop up, go into magic mode and your 'Magic' quick-slots come up) or maybe allow the quick-slot bar to be scrolled with the - + keys.

How do these sound? do other games implement anything like this? whats the general preference on hotkeys?
How do these sound? do other games implement anything like this? whats the general preference on hotkeys?[/quote]
Keyboard users expect to be allowed to use the primary advantage of their chosen implement of gaming - lots of configurable bindings. As such, you can expect your users (whether you wish it or not) to be looking to rebind several of your keys to assist their playstyle. A lot of people are likely going to want to rebind the keys above 5 to something closer to WASD for convenience, as an example, if such is used to move.

Essentially, you shouldn't be looking to provide a set of keybinds based upon physical location except only as a starting guide to assist newbies. Keyboards aren't controllers, so you should first decide how many bindings you want there to actually be.

The most prevalent method of key binding involves utilizing the modifier keys to alter the bind and thus cleanly apply multiple functionality to a single key. Using just a standard keyboard of 104 keys and the "big three" modifiers (Alt, Control, and Shift) gives you around 312 possible bindings (the actual number will vary depending on the API you're using) without combination (e.g. [Control] + [Shift] + [key] or [modifier] + [key] + [key]). Obviously, the true number of "usable" keys is generally a bit lower but you are still left with an extremely large number of potential key combinations to choose from. Out of this can arise a variety of "priority" schemes for certain actions. Spells use Shift, "Important Actions" use Control, etc. It's really up to you how to organize them.

Your biggest problem, in a game that uses a multitude of binds, is cleanly mirroring said binds in the game's GUI (both in terms of feedback from engaging a key bind and the actual function the bind is linked to) and providing the means for the user to quickly alter them as needed.
Advertisement
There's no limit to the numbers of keys or key combinations. It only matters if the driver could handle the situation by not blocking as well as the buffer size, and the keyboard has the diodes to prevent ghosting. No one has the money to modify their keyboard to have diodes for each key, nor do they have the ability to program a new keyboard driver to allow this limitless simultaneous key combination.

Hot keys need to follow two sides, the left handed and right handed method. With one way keep the keys near wasd, and in the other way, keep the keys near ijkl.
I use QueryPerformanceFrequency(), and the result averages to 8 nanoseconds or about 13 cpu cycles (1.66GHz CPU). Is that reasonable?
I though that the assembly equivalent to accessing unaligned data would be something similar to this order:

  • move
  • mask
  • shift
  • move
  • mask
  • shift
  • or

    So it seems reasonable to say that it takes 14 cycles for unaligned data since we'll have to do the series of instructions once to access and once to assign?
WTF guys? "The most prevalent method" of keybinding is to use single keys, not key combinations. Only games like Blizzard's fare and heavy flight simulators use enough keybinds that single keys aren't enough.

And indeed, binds should be possible to change always. Some good default keys for a right-handed player are (by row) 1234, QWER, ASDF, CV, space. These can all be reached from a single hand location. Thumb can easily press C, V and space. I particularly suggest space if your control scheme requires holding some button down occasionally.

There's about one good UI for binding keys: game names an action and user presses the key they want for that action. Some games (I'm looking at you, consoles...) still get this wrong, and ask what function you want to bind to a particular key. So you first have to look under your finger to check what key it is, then find that key in the menu, and browse to the action you want. Bleh.

This topic is closed to new replies.

Advertisement