New answers tagged


Have you considered supporting gamepad controllers? For inspiration the game Duel ( supports 4 positions on keyboard + others on gamepads. And for completeness - numpad keys can be used too to give you more room around the keyboard.


You need a keyboard with n-key rollover


As others have pointed out, you can't be sure the player has a keyboard with anti-ghosting so this simply wont be possible on most non-gaming keyboards. Regardless, I think the best solution would be to let the players decide when the game starts. Everyone positions their hands where they're comfortable then each player is prompted, one by one, to press ...


Just as a heads up, most keyboards have a finite limit of keys that can be pressed. For example, I have an Asus Transformer Book and you can only press around ~5 keys at a time. Some keyboards also won't allow more than a few keys pressed if shift or control is being pressed. (Like my Transformer Book...) And yes, most of the time, this is hardware limited, ...


Depends on the player's keyboard hardware. You cannot make a set that will work for sure on everyone's computer. Make sure your game design does not encourage the players to hold more than one key, as you'll run into the limit on the number of keys that can be reported at a time.


WASD and Arrow Keys are good options for two players. According to Wikipedia, IJKL is a common option, so that could be used for the third player. If the keyboard has a number pad, you can use that for the fourth player. Otherwise, GVBM is the most spaced set of letters in the WASD shape. For the fifth key for each player, you could potentially use a ...


For all intents and purposes what you have is essentially the Observer pattern in that you have an input class that maintains a list of callbacks or input handling objects. Other objects can then register with the input system to be notified when certain things happen(in this case when each key has been pressed). I might extend this system to allow users ...

Top 50 recent answers are included