Author Topic: Good way to do 8-directional movement with WASD  (Read 21467 times)

Eniko

  • Newcomer
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Good way to do 8-directional movement with WASD
« on: May 22, 2014, 01:13:53 PM »
So whenever someone who isn't that used to roguelikes plays my game MidBoss they ask me why they can't just control the game with WASD. Although you could just rebind the 4 cardinal directions to WASD and use QEZC for diagonals, they don't do that so I have to assume that's also not what they want, and what they want is a way to move in 8 directions with 4 keys.

I can't come up with any good way of doing this, honestly. In the old Python version it was a thing, and meant that you wouldn't move until you released the first movement key, while it waited to see if a second one was coming. That feels awful and I can't recall anyone who actually liked that option. The only other option is to add a short window after every keystroke where you can combine it with another key, but since MidBoss isn't an action game I'm pretty sure that'll feel just as bad as the old option, maybe slightly less bad.

So what's a good way to do this? Does anyone have a solution that both works and doesn't feel terrible? At this point I'm thinking I should just implement click and go mouse driven movement so that anyone who doesn't want to use 8 keys to get around can use that instead.  :-\

Aukustus

  • Rogueliker
  • ***
  • Posts: 440
  • Karma: +0/-0
    • View Profile
    • The Temple of Torment
Re: Good way to do 8-directional movement with WASD
« Reply #1 on: May 22, 2014, 01:22:45 PM »
Bind these, it's probably the only way with wasd.

Shift+A = up left
Ctrl+A = down left
Shift+D = up right
Ctrl+D = down right
« Last Edit: May 22, 2014, 01:24:27 PM by Aukustus »

getter77

  • Protector of the Temple
  • Global Moderator
  • Rogueliker
  • *****
  • Posts: 4957
  • Karma: +4/-1
    • View Profile
Re: Good way to do 8-directional movement with WASD
« Reply #2 on: May 22, 2014, 02:08:30 PM »
Holding a button in tandem with the needed direction key with perhaps a helpful mini-arrow of varying transparency is the Mystery Dungeon way of handling it(Every limited, non-mouse driven RL should probably just go ahead an wholesale steal all manner of UI and control wranglings from the Mystery Dungeon series as they've had this pretty well down since the SNES/GB/etc days)..and is probably the best way.  Give my own natural hand resting, I would think the absolute easiest is to have it Holding Left Shift + WASD as needed as that key tends to be where the pinky rests while the other 3 get a sort of trianglulation thing going on WAD or ASD depending.

YMMV as I am a lefty though~
Brian Emre Jeffears
Aspiring Designer/Programmer/Composer
In Training

mushroom patch

  • Rogueliker
  • ***
  • Posts: 554
  • Karma: +0/-0
    • View Profile
Re: Good way to do 8-directional movement with WASD
« Reply #3 on: May 22, 2014, 02:49:50 PM »
Seems like a strange question for your players to ask. The answer is obviously that in games that use WASD it's real time and you're continuously chording rather than making discrete button presses. There's no reason not to offer a WASD option as opposed to vi-style movement available in many roguelikes, though.

Re: other suggestions on modifiers + WASD, if it were me, I'd make left-shifted WASD bind to the corresponding direction rotated counterclockwise by 45 degrees (maybe right-shifted WASD the opposite, depending on whether keystrokes come to you with that kind of information). This sounds like what's done in the console game discussed in the other thread on this topic.

Cfyz

  • Rogueliker
  • ***
  • Posts: 194
  • Karma: +0/-0
    • View Profile
    • Email
Re: Good way to do 8-directional movement with WASD
« Reply #4 on: May 22, 2014, 04:00:53 PM »
Using several modifiers or rotating 45 degrees seems a bin non-intuitive to me. Maybe, combine keys if some modifier is pressed? This way with W or D you move up or right when button is pressed, but with Shift+W+D you move up-right when Shift is released (or when two keys have been pressed). IMHO this is easier to grasp, like basic and extended movement modes.

mushroom patch

  • Rogueliker
  • ***
  • Posts: 554
  • Karma: +0/-0
    • View Profile
Re: Good way to do 8-directional movement with WASD
« Reply #5 on: May 22, 2014, 04:13:13 PM »
It sounds awkward taking action on release of a modifier. The guy in the other thread said the console game he referred to uses some kind of visual cue to show what the modifier does to the usual movement directions. A similar thing could be done with the shift key in a tile based PC/whatever game -- show a quick animation where the tiles adjacent to the player in the cardinal directions are highlighted for a moment, followed by the diagonal directions. After a second of holding shift, the corresponding letters could be placed in the diagonal tiles for emphasis.

Rickton

  • Rogueliker
  • ***
  • Posts: 215
  • Karma: +0/-0
    • View Profile
    • Weirdfellows
Re: Good way to do 8-directional movement with WASD
« Reply #6 on: May 22, 2014, 06:07:24 PM »
Is MidBoss heavily mouse-driven? That's the reason so many games use WASD instead of arrow keys or numpad/vi-keys for movement, because you can have one hand on WASD, the other on the mouse. If it's not, why do they want WASD instead of arrow keys?

That said, I think that shift (with an onscreen indicator to show which buttons move in which direction) would be a good way to do it.

So whenever someone who isn't that used to roguelikes plays my game MidBoss they ask me why they can't just control the game with WASD.  Although you could just rebind the 4 cardinal directions to WASD and use QEZC for diagonals, they don't do that so I have to assume that's also not what they want, and what they want is a way to move in 8 directions with 4 keys.
Don't assume anything. Since they're already giving you feedback, ask them what it is they actually want. Otherwise you might just end up wasting your time fixing what you think is the problem, but isn't actually it at all.

At this point I'm thinking I should just implement click and go mouse driven movement so that anyone who doesn't want to use 8 keys to get around can use that instead.  :-\
Regardless of what you do with the keys, I'd say mouse movement would be a good idea too.
Creator of the 7DRL Possession: Escape from the Nether Regions
And its sequel, simply titled Possession

Eniko

  • Newcomer
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: Good way to do 8-directional movement with WASD
« Reply #7 on: May 22, 2014, 08:15:58 PM »
Thanks guys, some good comments from all of you. I'm working on adding a WASD option right now which works by visually starting the move but not committing it until the key is released or another key is added to create a diagonal move, in which case it veers off. Unfortunately it requires a complete rework of my renderer and means I need to implement animations and key repeat sooner rather than later, so it's going to be a ton of work. :/

I might also look into adding the shift modifier as an option, and mouse movement will definitely be a thing too. Unfortunately, mouse movement is also tricky. If anyone can point me to a roguelike that does mouse movement well, I'd be grateful.

awake

  • Newcomer
  • Posts: 43
  • Karma: +0/-0
    • View Profile
Re: Good way to do 8-directional movement with WASD
« Reply #8 on: May 22, 2014, 08:46:26 PM »
Thanks guys, some good comments from all of you. I'm working on adding a WASD option right now which works by visually starting the move but not committing it until the key is released or another key is added to create a diagonal move, in which case it veers off. Unfortunately it requires a complete rework of my renderer and means I need to implement animations and key repeat sooner rather than later, so it's going to be a ton of work. :/

I might also look into adding the shift modifier as an option, and mouse movement will definitely be a thing too. Unfortunately, mouse movement is also tricky. If anyone can point me to a roguelike that does mouse movement well, I'd be grateful.

Your solution sounds perfect if it "feels right", but it's tough to judge without trying.

I picture this happening tho:

1) push direction key
2) realize that's a bad idea
3) stuck with my finger on key, trying to decide if I'm better off just picking my finger up or going diagonal

What I'm sayin is that it might be nice br able to "cancel out" of a move before you have fully comitted

Z

  • Rogueliker
  • ***
  • Posts: 905
  • Karma: +0/-0
    • View Profile
    • Z's Roguelike Stuff
Re: Good way to do 8-directional movement with WASD
« Reply #9 on: May 22, 2014, 09:36:13 PM »
Thanks guys, some good comments from all of you. I'm working on adding a WASD option right now which works by visually starting the move but not committing it until the key is released or another key is added to create a diagonal move, in which case it veers off. Unfortunately it requires a complete rework of my renderer and means I need to implement animations and key repeat sooner rather than later, so it's going to be a ton of work. :/

I have recently added such a feature to NotEye. I think it is not yet implemented in the latest release of NotEye, but it should be available in the newest public prerelease of ADOM. http://www.ancientdomainsofmystery.com/2014/05/adom-120p23-released-to-general-public.html

Endorya

  • Rogueliker
  • ***
  • Posts: 513
  • Karma: +0/-0
  • The non-purist roguelike lover
    • View Profile
    • Email
Re: Good way to do 8-directional movement with WASD
« Reply #10 on: May 23, 2014, 08:08:10 AM »
Not filling comfortable with WASD + QEZC in a game that is supposed to be controlled with keyboard feels awkward to me. In other words, it seems that the people who tried your game just want to complicate the whole thing when the solution is already there. Not even mouse control can be as efficient as keyboard to a control a character in a roguelike game. A perfect interface for a roguelike would be having 8 direction and mouse to operate the whole interface, including selecting targets and to get general information from every tile or foe within the character's sight range. Your friends need simply to adapt to circumstances, the same way they would need to adapt to a gaming console as there is no WASD + Mouse (vanilla setting).

In your case, whatever the solution I can think off, it just ends up adding more effort to it. I would simply add WASD + QEZC control as well as mouse support. Some game's are meant to be played in a particular way for comfort reasons. FPS use WASD + Mouse, RTS mouse only (with some UI key shortcuts), flight simulators use joystick / HOTAS (and a whole shit of key combinations) and roguelikes 8 direction key movement + mouse is advised. Trying to change these controlling mechanics is begging for masochism.

You can in fact operate any game using just 2 keys. One key to open an option screen and then pressing it again over and over to cycle through all the options the game has and finally another key to select the desired option. Heck, you could in fact operate Windows this way but I really doubt it would be a comfortable way of handling it. So yeah, you can easily have 4 keys doing the job of 8 keys but the question is, how good will it be in the end?

So in other words, if someone else asks you if they can have WASD to play your game, simply say: "No! These are they keys you need to use to play it, get used to it and you will thank me later." It is hard to believe that someone who feels already uncomfortable with the 8 direction key mapping will actually enjoy a roguelike.
« Last Edit: May 23, 2014, 03:58:50 PM by Endorya »
"You are never alone. Death is always near watching you."

Eniko

  • Newcomer
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: Good way to do 8-directional movement with WASD
« Reply #11 on: May 24, 2014, 12:26:38 PM »
Not filling comfortable with WASD + QEZC in a game that is supposed to be controlled with keyboard feels awkward to me. In other words, it seems that the people who tried your game just want to complicate the whole thing when the solution is already there. Not even mouse control can be as efficient as keyboard to a control a character in a roguelike game. A perfect interface for a roguelike would be having 8 direction and mouse to operate the whole interface, including selecting targets and to get general information from every tile or foe within the character's sight range. Your friends need simply to adapt to circumstances, the same way they would need to adapt to a gaming console as there is no WASD + Mouse (vanilla setting).
Totally agree, but since I do want to make a living off of making games, I'm unfortunately still forced to implement a 4-key solution, and somehow make it feel at least acceptable. :( I tried to make the rest of the game easier to get into for people who aren't used to roguelikes, so I guess this is what I get for my efforts. :P

Avagart

  • 7DRL Reviewer
  • Rogueliker
  • *
  • Posts: 567
  • Karma: +0/-0
    • View Profile
Re: Good way to do 8-directional movement with WASD
« Reply #12 on: May 24, 2014, 01:58:06 PM »
I think that cotrols in Desktop Dungeon works very well. When you hold the button just choose direction, and player's character move (or attack) only when you 'release' the button. Pour example: you want to go west and you push 'a' button. Suddenly you change your mind and wanna go north-west. Holding 'a' you press 'w' button and release 'w' and 'a' same time. It sounds a little weird, but it's very handy.

OnlyLuck

  • Newcomer
  • Posts: 1
  • Karma: +0/-0
    • View Profile
    • OnlyLuck Interactive
    • Email
Re: Good way to do 8-directional movement with WASD
« Reply #13 on: May 27, 2014, 02:05:19 AM »
When working on my game I came across a similar problem of wanting to use the WASD keys, but the limiting factor of not being able to do the diagonal bugged me.  Right now I am testing out doing multiple key presses: W+ A = Diagonal up left, W+ D = Diagonal up Right, etc...  I found the trick to do this was a delayed input for like 0.05 seconds to see if another key was pressed.  Still testing it, but it seems to work pretty good.  You can try it out on my dev build that is posted on as Unity Web Player:  http://onlyluck.ca/DOD/

Eniko

  • Newcomer
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: Good way to do 8-directional movement with WASD
« Reply #14 on: May 27, 2014, 05:49:25 PM »
When working on my game I came across a similar problem of wanting to use the WASD keys, but the limiting factor of not being able to do the diagonal bugged me.  Right now I am testing out doing multiple key presses: W+ A = Diagonal up left, W+ D = Diagonal up Right, etc...  I found the trick to do this was a delayed input for like 0.05 seconds to see if another key was pressed.  Still testing it, but it seems to work pretty good.  You can try it out on my dev build that is posted on as Unity Web Player:  http://onlyluck.ca/DOD/
Yeah I've implemented that type of system myself as well now. Finally got input all sorted after several excruciating days of working on nothing but that all day long. XD Which means I can finally start working on other things, like actual content and features! :D