New answers tagged

1

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, ...


0

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.


0

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 ...


1

Whether you handle input through callbacks or in the game loop have their advantages and disadvantages: Using callbacks: this method make sure to detect any key the user press ,or any other form of input. Being an asynchronous event, any callback is fired at any time, granting real-time input detection. CONS: user input may affect your simulation at any ...


2

If you handle input directly from the OS's event callback (or similar platform events), you generally only have access to the data the OS gave you for that event. That data usually only pertains to the immediate input action (pressing this key or moving the mouse on that axis, and maybe some information about what modifiers were down). This can make it ...


2

Init your Dictionary in your Awake first: ShotKeys = new Dictionary<KeyCode, WeaponTags> ();



Top 50 recent answers are included