View Full Version : Keyboard conflicts on 2 player games?
Jamie W
05-09-2006, 05:50 AM
Hello,
I need to map keys (for each player) for left, right, jump and fire ..
Would there be any problem with keyboard conflicts? it's for a 2 player PC game (both players using the same keyboard).
jankoM
05-09-2006, 05:58 AM
I don't know the expert answer but one of my keyboards (the really lame one) doesn't detect some keys if some others are pressed. Even arrow keys?! So play a platformer with that if you can (you cant go left and jump). That's why i now like games where I can redefine keys so I recommend you do this.
Jamie W
05-09-2006, 06:13 AM
I don't know the expert answer but one of my keyboards (the really lame one) doesn't detect some keys if some others are pressed. Even arrow keys?! So play a platformer with that if you can (you cant go left and jump). That's why i now like games where I can redefine keys so I recommend you do this.
Thanks jankoM.
That's pretty much my thinking too. Redefinable keys and also support for other input devices like joypads etc (though I'm guessing a lot of people don't have them).
Savant
05-09-2006, 06:42 AM
There used to be issues with keyboards not detecting more than 3 keys being held down at once or something. Might not be an issue anymore, but something to maybe research via Google before diving in.
If I remember correctly, some USB keyboards have a conflict with space where you can't use space and 2 arrow keys at the same time.
cam across this with our game on my home keyboard where 'jump' was set to space, and trying to jump up and left didn't work.
Switching jump to another key fixed it. I think if you generally avoid using any of the non-alphanumeric keys for aything in-game, you should be ok to use arrow keys.
DanMarshall
05-09-2006, 07:03 AM
Gibbage (http://www.gibbage.co.uk) is a 2-player game, largely played with the keyboard. I haven't had any issues on any of the machines I tested it on, and I haven't had anyone complain about it being unplayable due to the keyboard locking...
Nikster
05-09-2006, 07:25 AM
You might want to google for "keyboard matrix ghosting", I think there was a thread about it already where some keyboards when two certain keys are pressed, one won't get a look in etc, but seemed to vary from keyboard to keyboard, but in general, it shouldn't be a problem.
If I remember correctly, some USB keyboards have a conflict with space where you can't use space and 2 arrow keys at the same time.
[...]
With cherry keyboards you cant press space+up+left at the same time. Up+left+right also doesnt work.
You have this kind of problems with all keyboards. The only exception is that hardcore gamer keyboard (iirc its from revoltec), which allows you to press any 10 keys at the same time.
So, the only thing you can do about it is trying to find pretty good defaults, joypad support and redefinable controls.
Pyabo
05-09-2006, 11:44 AM
It definitely varies by keyboard. This is why the original Star Control shipped with the "Key Jammin'" utility... so you could find combinations that worked OK together.
Hiro_Antagonist
05-09-2006, 11:56 AM
pyabo beat me to it. I remember 14 years ago trying to find key combinations that would actually register all at once for just one player. Finding a suitable combo of keys for 2 players was damn near impossible and required some serious finger gymnastics.
RoadMaster
05-10-2006, 01:03 PM
It really depends on how the game behaves as well. For example, games where you "tap" keys every once in a while tend to behave fairly safely, as there usually aren't more than 2 keys being pushed at once, but if you have a game where you are perhaps moving from a top down view, maybe you have up and right held to go diagonally... and then you have a shoot button, and then you suddenly hear the person beside you yelling because he can't move right anymore.
This issue occurs because there are less bits being sent through that cable then there are keys on your keyboard. In other words, possible data combinations > data which can be transferred. A "key" now becomes a combination of certain bits, and those bits are shared with other keys. But, if two keys use the same bits when transferring you may get a signal which does not portray all the keys being pressed, or worse yet thinks a different key entirely is being used. Often keyboards will deal with these problems by "locking out" keys which will cause such problems, so that signals sent at least make some sense. This also depends if you have a PS2 or USB keyboard, as I think USBs should have a higher transfer rate, and thus *should* be safer if they are designed well. I love my old clicky IBM keyboard, but I know I can't play streetfighter with it :).
I'd say in the end, find a combination which works reasonably well, and perhaps suggest a gamepad for users who are having trouble (or even network support?) :)
BarrySlisk
05-14-2006, 01:54 AM
You might want to google for "keyboard matrix ghosting",
I just did, and all I got was this thread!!! :)
I just did, and all I got was this thread!!! :)
Heh. Yea, well... try: "keyboard matrix" ghosting
Nikster
05-14-2006, 05:03 AM
Yeah, you shouldn't have included the quotes ;)
vBulletin v3.6.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.