Advice on controls

G

Guitarmike

Guest
Hi,
I'm creating a traditional sidescrolling platformer. In addition to the basic WASD movement controls, the character can do a melee attack, a ranged attack, and a "special" attack. Right now I map those to the keypad 1, 2, and 3 keys, respectively. It just doesn't feel right. Any advice on other layouts I should try?
 
Why not put your three attacks on any other 3 keys in a row (ones that are not normally used for movement)? Something like "J, K, L", "<, >, ?", or "B, N, M". I think as long as a player can rest their fingers on them easily, then any 3 key combination should be fine provided that they are on the same row.
I would actually recommend allowing the player to map their controls to whatever they want so then you just need to set up a default mapping and let the player change these to whatever they feel comfortable with.
There may be people out there who prefer moving using thei right hand on the numpad, and would want A,S,D as the attacks (or even 1,2,3 on the main part of the keyboard) using their left hand.
You will probably never find something that everyone is happy with, so allowing control mapping is a must.
 
W

Widget

Guest
Well rebindable controls is always going to be the correct answer here but by default I'd put movement on the arrow keys and your actions buttons on the left-side of the keyboard always. If the player's left-hand fingers are resting like that, it means their thumb can easily press the spacebar, which can be a second jump button or interact button. It's also close to Ctrl, Shift, and Esc, all commonly used keys for games.

And lastly, never assume action buttons to the keypad. Because the player may be using a laptop or a keyboard that simply doesn't have one.
 
I always use my left hand for movement in games, so if they are only mapped to arrow keys with other actions on the main area of the keyboard, then I have to cross over my hands to play, which is manageable I guess.
So what I do for key mapping is usually try and have two maps that don't overlap. For example, I may use WASD and JKL as my default keys, but then also map those same actions to the Arrow keys and ZXC. Both seem pretty standard to me and this way I can accommodate normal people as well as weirdos like me.
 

flerpyderp

Member
So what I do for key mapping is usually try and have two maps that don't overlap. For example, I may use WASD and JKL as my default keys, but then also map those same actions to the Arrow keys and ZXC. Both seem pretty standard to me and this way I can accommodate normal people as well as weirdos like me.
I do this also. I'm always disappointed when I find a game, especially if it's action focused, does not either allow WASD instead of arrows, or complete customization of controls. If they offer controller support then at least there's that, but I still find it bizarre that so many people must prefer right hand movement for it to remain the default control scheme for many games, after all these years of becoming accustomed to gamepad and keyboard/mouse layouts.
 
I actually have an input object(persistent) that I assign keys and buttons to actions, which makes things much easier. Meaning that when I used if(obj_input.jump), that will check at least two keyboard keys and one gamepad button and if I change and of those keys/buttons, I don't have to worry about changing any code for my player. So I strongly suggest looking into trying something like that too.
 

flerpyderp

Member
I actually have an input object(persistent) that I assign keys and buttons to actions, which makes things much easier. Meaning that when I used if(obj_input.jump), that will check at least two keyboard keys and one gamepad button and if I change and of those keys/buttons, I don't have to worry about changing any code for my player. So I strongly suggest looking into trying something like that too.
Exactly how I've always done it. I'm yet to implement customizable controls though, so that's what I'll be looking into next; regardless of whatever control scheme you think works best, in the end it's best to just let the player choose what mapping suits them.
 
A

Andy

Guest
I use the arrow keys to move, enter for start, shift for select, and z,x,a,s for the face buttons. Since everyone has different preferences you should allow users to map their keybindings. :)
 
N

NeZvers

Guest
I hate when movement is only for right-hand a.k.a arrow keys - no mainstream gamepad had a movement for the right hand.
If you put it on arrows then do it for WASD where it's convenient to press space for jump, shift secondary movement (run), CTRL for like crouching (not fond for that tho). It makes your right hand free for action buttons. Numpad should be avoided since there are people that use short keyboard or laptops.
 
Top