How we designed the hotkey system

Discussion in 'Planetary Annihilation General Discussion' started by metabolical, May 27, 2014.

  1. metabolical

    metabolical Uber Alumni

    Messages:
    312
    Likes Received:
    1,366
    The Galactic War Update brought in a new hotkey system designed to make it easy to build things from the keyboard. I thought it would be useful to elaborate on what factors influenced the design. We may continue to refine this design, and of course there is the popular mod hotbuild2 already out there for those who like that design.

    First, let me state the design requirements and then we can discuss how that shaped our choices.

    1. All items should be buildable from the keyboard so you don't need to move the mouse back and forth between where you place things and the build bar.
    2. The same key sequences should deterministically build a given unit, regardless of selection of fabricators/factories, so you can commit the the key sequence to muscle memory and stop thinking about it.
    3. Just as common key sequences are important, common visual locations are import for people who prefer to use the mouse.
    4. The interface should visually represent what keys could be pressed, so it can teach people how to use the keys.
    5. A spectator on Twitch should be able to see what key was pressed so they can know what was built even if it happened quickly.
    6. Key sequences should be short and easy, especially for the most commonly built items.
    7. Queuing up multiple units at a factory should be fast.
    8. The design should have some capacity for expansion and modability.
    9. Avoid collisions with RTS standards, like A is Attack and S is stop.

    Before we defined these requirements, we were planning to model it after hotbuild2 given it was already popular and familiar to some and we love you guys. We abandoned that model because it violated #2 and to a degree #3. At that time, we hadn't come up with the visual requirements yet so we didn't have an idea of how we would explain visually the idea that one key would be pressed repeatedly in order to build different items.

    The combined requirements of both common key sequences and visual locations helped inspire creating a correlation between the grid of the build bar and the grid of your keyboard. Trying to put items in static locations resulted in the sometimes empty looking bar, so we focused on making the basic stuff on the bottom row and the advanced and orbital stuff at the top, so we could collapse the upper rows if there wasn't anything in those slots.

    We thought about making it so if you only had a bot factory selected, then you wouldn't have to press the "bot" prefix key in order to build bots, but that violated requirement #2. Fortunately, once you press it you can keep queuing up items as long as you don't delay longer than the one second section timeout. In galactic war, I found myself pressing L to set continuous build, and then just strumming the ZXCV sequence on my vehicle factories to get one of each going.

    You'll note that when you press a key sequence, the selected item flashes momentarily to satisfy requirement #5.

    I had really hoped to have the most common sequences be just one key, but with so much stuff to build and the ability to heterogenous selections of builders, it ran into conflict with the other requirements, especially #2. Even if you could only have homogenous factory selections, you still might need a prefix key to avoid requirement #9.

    So the build bar is big, and we're looking at some tweaks to help with that. For example, we're trying internally a change so fabricators have an orbital tab like factories do, allowing us to reduce the number of rows and make the orbital fabber bar less blank. Also, we'd like to have a advanced mode where only the active build tab shows up and only when you press the prefix key, and collapses once you make your choice and start placing, so by default there is no loss of screen space.
    LavaSnake, Jaedrik, Gorbles and 23 others like this.
  2. popededi

    popededi Well-Known Member

    Messages:
    784
    Likes Received:
    553
    I guess you read our little discussion thread on this. Thanks for the update.

    I understand that you wouldn't want to clash with RTS standards when it comes to A and S, but in this case we need to figure out a way to replace WASD for camera control, or at least throw in a solution into the options menu, where upon turning on of WASD it notifies the player of it conflicting with hotkeys, or automatically unbinding them, as it will become confusing.

    It did confuse me the first time I tried playing this update.

    Edit: Of course I say this because I know how important these tiny things are as a great many people either don't look at options and go straight with default settings, or they're like me, they see WASD is an option, turn it on, say hurray! and go on with playing.

    Also grammar.
    lokiCML likes this.
  3. lokiCML

    lokiCML Post Master General

    Messages:
    1,973
    Likes Received:
    953
    I love these posts. They're awesome. Bring the thought process behind the game to you.
    Gorbles, Schulti, corteks and 5 others like this.
  4. stuart98

    stuart98 Post Master General

    Messages:
    6,009
    Likes Received:
    3,888
    How exactly did it violate #2?
  5. phantomtom

    phantomtom Active Member

    Messages:
    420
    Likes Received:
    63
    Me 2! i like a hearing about plans and masterplans plan`d out to the extream. so if a good plan is pland out u can plan a better plan to plan it out. kinda like a super plan u know:D Plans are awesome!
    lokiCML likes this.
  6. DeadStretch

    DeadStretch Post Master General

    Messages:
    7,407
    Likes Received:
    554
    "A spectator on Twitch should be able to see what key was pressed so they can know what was built even if it happened quickly."

    Ohhhh I like that one.
  7. lokiCML

    lokiCML Post Master General

    Messages:
    1,973
    Likes Received:
    953
    We need a way for people to learn the differences in this game up there to other RTSs. A contextual tutorial mode in galactic war either through a mod or a vanilla would really help. Would deftly keep a larger amount of players if there was one.:)
  8. zweistein000

    zweistein000 Post Master General

    Messages:
    1,362
    Likes Received:
    727
    Even though I love Hotbuild 2 and prefer it over default hotkeys I think you guys did an excellent job at hotkeys. They just follow a different logic than hotbuild2.
    proeleert likes this.
  9. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    I remapped my keys because of an issue with this - they keys used to select a subset are also used with the subsets, so once you start a mode your muscle memory fails.

    Speaking of muscle memory, ESC means both 'cancel' (which I do a lot), and 'bring up sidebar options' (which I do rarely), and some things get hidden when the options menu is up, so I have press ESC again (but not twice, which will just reopen it)

    +1 I've thought about making a modal build mod, and the new keybindings are halfway there.

    I'm also curious how you plan to extend this fixed-position system for new units.
  10. zweistein000

    zweistein000 Post Master General

    Messages:
    1,362
    Likes Received:
    727
    Try selecting multiple factory types simultaneously and queueing up a singe unit type.
    Pendaelose and neophyr3 like this.
  11. ace63

    ace63 Post Master General

    Messages:
    1,067
    Likes Received:
    826
    Thanks for explaining the thought and design process.
    We desperately need an option to reset the build menu to the highest level though.
    lokiCML likes this.
  12. thetrophysystem

    thetrophysystem Post Master General

    Messages:
    7,050
    Likes Received:
    2,874
    The same key presses produced different results based on which fabber you had selected. Like naval or air or land or t1 or t2.

    I like the grid setup, but at the same time I don't use wasd nor do I like the preset rts standard buttons. I modified my hotkeys long ago to give build hotkeys on the left hand and unit commands on the right hand. So mine was already gridded technically. However, my commands were also gridded on the right hand side of the keyboard.

    I had similar commands above-below and going left and right. Attack and reclaim atop and under, move and patrol atop and under, assist and repair above and below.
  13. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    While reading your requirements I was agreeing on them. However the text afterwards makes me think #2 is missunderstood in some way or the other. I would have though hotbuild2 fullfils it, because hotbuild2 does allow me to quickly learn sequences to be inside of my hand and not inside of my brain.
    Thinking more about it I can see your issue with how on higher tech engineers the rotating sequence of stuff to build is longer and therefore multiple key tabs have different outcomes. However in practice it turns out that players (at least I myself) do usually know exactly what they have selected. At least they should know, that's something other UI parts (especially the selection system, which is still broken :<) should ensure. So it is okay to have somewhat different key sequences depending on what you selected.

    So I think you are too hard following #2, i.e. the "we need 2 key presses even if only a bot factory is selected" is plain bad in my eyes. Above all else a good keylayout should strive to reduce the number of keypresses required to achive the goal. To achieve this is a context depending system (context = selection) is completely fine.
    Additionally for your bot factory scenario: In practice I've never itentionallly selected multiple types of factories to queue up stuff. In fact hotbuild2 cannot even do this. It queues up tanks and bots on the same key. But as I said before, players are quite thoughtful of their current selection, so it is not an issue. Players usually only have 1 factory type selected when giving a "build unit" command. So adding in an extra key is adding in pointless extra work for the player.

    So basically #2 sounds good at first, but it turns out the muscle memory can in fact deal with the context of different selections. So it's fine to make the whole keystructure depending on the selection, which effectively replaces one keypress.

    I also don't think hotbuild2 violates #3. #3 is purely about how you organize your click things, the keylayout has nothing to do with it.

    Oh and as far as I am concerned ESC was stop in FA. s was and is (in non wasd hotbuild2) mex.
    Last edited: May 27, 2014
  14. thetrophysystem

    thetrophysystem Post Master General

    Messages:
    7,050
    Likes Received:
    2,874
    Oh yeah, and with hotbuild I never explained this either, but I used "combat units" on one key, even across factories. So if I want vehicle and bot factory combat units, 1 keypress. If I want anti air, 1 keypress. If I want vehicle combat units and bot combat fabbers and antiair, of course I have to queue them differently. I suppose if I had more keys, I could get around that :p

    But I always knew what key to press. If I want a tank, I press a key, whether it is a tread tank, a walking tank, a floating tank, or a flying tank. If I want anti air, whether it flies or walks or drives, it was 1 key. I didn't have to learn different keys for different factories.
    mishtakashi and wondible like this.
  15. SikkeSakke

    SikkeSakke Member

    Messages:
    56
    Likes Received:
    12
    I've been using almost default settings and when you get used to it, it feels more confortable in every time I play. I don't even mind anymore that I have to press two keys when ordering factories to build items. It needs a little (a lot for me :)) practise to get hotkeys in your spine but it's getting better and better the more I play.

    One thing is what made me change default settings:
    That delay is too much when fabbers are building mexes and defenses. Default keys are in nicely ordered rows that are easy to remember. I didn't change those rows, I just lift default build keys one row up at keyboard. Number row (1,2,3,4) to F-row (F1,F2,F3,F4). Q-row (q,w,e,r) to number row (1,2,3,4) and so on. This way I can avoid delay when choosing category.

    Visually it's logical and I like it. Just give option to resize it a bit and I'd be happy.
    wondible likes this.
  16. thetrophysystem

    thetrophysystem Post Master General

    Messages:
    7,050
    Likes Received:
    2,874
    I thought that delay was slightly annoying. Wish I would go in and change it.
  17. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    Oh yeah that's another thing: Never, ever, ever make any keysystem depend on a delay that the player has to wait for until he is back in some sort of default state. Having to wait a full second can be very painful.
    Hotbuild2 has a little tiny piece of logic that resets the cycle the moment you actually place the selected building without holding shift. So you can quickly place a building and you can be sure that the cycle is reset directly after you place the building unless you press shift in which case you tell the keysystem "I want to continue here".
    Clopse, cptconundrum and mered4 like this.
  18. mered4

    mered4 Post Master General

    Messages:
    4,083
    Likes Received:
    3,149
    Completely agree. I've never really used a hotkey system before, and I loved hotbuild's rotating key structure. I've customized it to my preference - and I wish it was working with factories again - and I don't really like the new system of two different keys, honestly.
    I'm sure I could get used to it, given time and willpower, but I'm so much faster with hotbuild anyway....
    I also use WASD for cam movement, though lately I've been using camera anchors more. And i'd like for the new system to be compatible with that, at least.
  19. thetrophysystem

    thetrophysystem Post Master General

    Messages:
    7,050
    Likes Received:
    2,874
    I think the delay is due to the grid. It needs time to snap back out of the grid, yet a sustained state to stay in the grid and place multiple orders.

    Really, I am not sure I know what to do about that. I almost wish a key returned you to the state, because when I flip back and forth from mex and pgen, I always miss that delay when moving my screen, and then I have no clue why stuff won't work.

    Either way, that will take some figuring out. Maybe the delay shouldn't exist and allow the keys to change build tabs to remain persistent even when in-tab. That was what I thought would be best before.
  20. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    I gave the solution, didn't I? Look at hotbuild2: It resets the state the moment you place a building without holding shift. That's turns out to be the perfectly intuitive solution.
    neophyr3, mishtakashi and websterx01 like this.

Share This Page