Author Topic: Hexagonal UI (numpad-less)  (Read 4273 times)

AgingMinotaur

  • Rogueliker
  • ***
  • Posts: 801
  • Karma: +2/-0
  • Original Discriminating Buffalo Man
    • View Profile
    • Land of Strangers
Hexagonal UI (numpad-less)
« on: July 18, 2012, 11:42:07 AM »
Hey all. I'm in the early design phase of what may become a new game, planning basic features, UI, etc. I might like to implement hexagonal movement, but am at a loss as to how to do so, assuming not everyone has a numpad. Now I'm hoping to spawn some debate about the topic, to the benefit of myself and maybe others.

Some possible solutions include:

1) Mouse controlled: Sure enough, but the game should also be playable with the keyboard only, as God intended.

2) vi-keys: As if! Allowing the player to rebind the keys is a Good Thing, so vi-freaks and other weirdos can get their fix, but this is hardly a good default.

3) "weadzx", "uihknm" or some other vaguely hexagonal-shaped cluster of keys: I do find it's a bit of a shame to leave the arrow keys out of it. For one thing, it means a new player has to spend time consulting the manual/help before being able to play at all. Also, keyboards of different nationalities have different layouts. For instance, "weadzx" wouldn't work on a German keyboard.

4) Shift+arrow rotates 45°: Shift+up for northeast, shift+down for southwest, etc. Some games have this, and sooth to say, it does the job. On a hexagonal map, it's obvious from the outset that you're supposed to be able to move diagonally (as opposed to an 8-directional map, where some will just gleefully keep to the four cardinal directions). The problem remains that it's hardly obvious.

5) "Chords": Ie. simultaneously pressing up and right to move northeast, etc. Works well in games with continuous maps. In your typical RL, a problem would be how to handle keyboard input. If the program accepts commands the moment a key is pressed, it might become fiddly: If you want to move southwest, and press the down key a fraction of a second after the left key, you'd end up moving west once before turning southwest. Conversely, if commands are processed when a key is released, you'd have to repress the directional button(s) for every turn you wanted to move, which might become tedious.

6) Explicit facing and separate command to move/bump: Combined with 4) or 5), but pressing a direction would simply rotate your guy. There would be a separate key to advance (or bump, as it were). In winding corridors and the like, you'd probably want to automatically change directions when appropriate, as seen in Jeff Lait's 7DRLs and other games. As a small boon, this would make flow-breaking "zap in which direction"-prompts unnecessary, and might solve some issues I have with bumping in general, if well-designed. But I can foresee a lot of people having a problem with this solution. as it does increase the number of keystrokes significantly.

That's be about as far as I've come in considering this. I'd be happy to read what you guys might think. On a side note, I read Darren's "designing for non-RL-ers" with interest, and I think that text's defense of hexagonal movement is heroic. But in the context of making a truly "accessible" game in the terms outlined, I still ask myself whether four-directional movement isn't really the only plausible way to go. ;)

As always,
Minotauros
This matir, as laborintus, Dedalus hous, hath many halkes and hurnes ... wyndynges and wrynkelynges.

Darren Grey

  • Rogueliker
  • ***
  • Posts: 1981
  • Karma: +0/-0
  • It is pitch black. You are likely to eat someone.
    • View Profile
    • Games of Grey
Re: Hexagonal UI (numpad-less)
« Reply #1 on: July 18, 2012, 12:02:00 PM »
I think QWEASD is better than WEADZX because it maps on top of the traditional WASD and is more comfortable to use.  For notebooks in general though I don't think there's a particularly good solution.

AgingMinotaur

  • Rogueliker
  • ***
  • Posts: 801
  • Karma: +2/-0
  • Original Discriminating Buffalo Man
    • View Profile
    • Land of Strangers
Re: Hexagonal UI (numpad-less)
« Reply #2 on: July 20, 2012, 10:22:14 AM »
Hmm. No joy getting a discussion up and going, huh? Oh well :)

In any case, I thought I might mention another problem with solution no. 6) outlined above: If the game features targeting or a cursor-controlled Look-command, this system will reveal its crappiness. But it might work for a small-scale tactical game.

As always,
Minotauros

This matir, as laborintus, Dedalus hous, hath many halkes and hurnes ... wyndynges and wrynkelynges.

Z

  • Rogueliker
  • ***
  • Posts: 905
  • Karma: +0/-0
    • View Profile
    • Z's Roguelike Stuff
Re: Hexagonal UI (numpad-less)
« Reply #3 on: July 20, 2012, 11:14:43 AM »
While chords are not reasonable in 8-directional movement, they are reasonable in hex. You no longer need up/down on themselves, and thus you can use them as modifiers. There is no confusion. At least theoretically. I have just added it to Hydra Slayer (will be in 13.6), and it feels strange that you need to press up/down before pressing left/right. But I think it becomes better with practice.

And whether you should use WEADZX or QWEASD depends on the orientation on your hexes. Both are very natural for their orientations. An advantage of WEADZX is that it leads to a nice ASCII view (Hydra Slayer does not support WEADZX yet, but in the ASCII mode, it even uses neighboring blanks to show large hydras neatly). Other keyboard layouts are indeed a problem, probably it is the best to have configurable keys.

I think you have tried it, but Vapors of Insanity has your (6) as an option (and WEADZX, VI, and numpad as other options). So you can see how it works.

AgingMinotaur

  • Rogueliker
  • ***
  • Posts: 801
  • Karma: +2/-0
  • Original Discriminating Buffalo Man
    • View Profile
    • Land of Strangers
Re: Hexagonal UI (numpad-less)
« Reply #4 on: July 20, 2012, 07:33:04 PM »
While chords are not reasonable in 8-directional movement, they are reasonable in hex. You no longer need up/down on themselves, and thus you can use them as modifiers.
Yes, it actually seems worth a try. I might check it out in the next HS (which I've been curious about for a long time, anyway), and anyway probably just throw together a quick demo for myself at home.

Making the controls highly configurable seems in any case to be a particularly good idea when dealing with hex movement.

And whether you should use WEADZX or QWEASD depends on the orientation on your hexes. Both are very natural for their orientations. An advantage of WEADZX is that it leads to a nice ASCII view.
Even with a graphical display, weadzx-orientation means tiles take up slightly less space diagonally than vertically – good, if your monitor has a higher x-resolution than y-resolution.

I think you have tried it, but Vapors of Insanity has your (6) as an option (and WEADZX, VI, and numpad as other options). So you can see how it works.
I didn't notice weadzx was an option there. Tried it hexagonal with the vi keys, but became slightly sea sick. Anyway, I've been meaning to drop a comment about VoI, as I'm still having some problems getting into it (some of which would be easy for you to fix or make configurable). I'll grab the latest version and try it one of these days. That game has so much going for it, but it seems my attempt to play it is jinxed (or hexed, as it were :P).

As always,
Minotauros
This matir, as laborintus, Dedalus hous, hath many halkes and hurnes ... wyndynges and wrynkelynges.

AgingMinotaur

  • Rogueliker
  • ***
  • Posts: 801
  • Karma: +2/-0
  • Original Discriminating Buffalo Man
    • View Profile
    • Land of Strangers
Re: Hexagonal UI (numpad-less)
« Reply #5 on: July 20, 2012, 09:57:00 PM »
By the way, if anyone should be interested: Here's a 7drl I wanted to make this year, but abandoned due to lack of time. It's a mini-puzzle-coffee-break-thingie that uses hexagonal movement with chords to change facing and a separate move command (use number keys to activate skills, including movement). In this particular game, that scheme does make sense. I'm putting it here to be done with it, I guess. It requires Python and pygame to run.

http://code.google.com/p/out-of-breadth/downloads/list

As always,
Minotauros
This matir, as laborintus, Dedalus hous, hath many halkes and hurnes ... wyndynges and wrynkelynges.

st33d

  • Rogueliker
  • ***
  • Posts: 111
  • Karma: +1/-0
    • View Profile
    • Email
Re: Hexagonal UI (numpad-less)
« Reply #6 on: July 21, 2012, 06:27:57 PM »
All games should come with key-config because of disabled/foreign players. That's just not being a dick in general.

You should tailor to one HID only. Even gamepads have taken over in FPS over mouse + keys.

I honestly think that hex should be controlled with mouse for a casual entry point to the game and graduate to keys for pro-players.

Hex does have the advantage in purity of mechanics over squares. This should be celebrated, but inviting people to the party needs to be done without scaring too many people off. Hexes remind people of bees. It's only natural for them to be afraid of them.

Darren Grey

  • Rogueliker
  • ***
  • Posts: 1981
  • Karma: +0/-0
  • It is pitch black. You are likely to eat someone.
    • View Profile
    • Games of Grey
Re: Hexagonal UI (numpad-less)
« Reply #7 on: July 21, 2012, 08:15:32 PM »
Yeah, you have to point out the honey, and maybe provide the user with gloves and a mask.