Lachie Dazdarian wrote:My keyboard works fine.
So the numpad works fine using both the first and the second examples?
Lachie Dazdarian wrote:BTW, I'm with dabooda on this. Shees, you can easily code using MULTIKEY so the user needs to press keys REPEADETLY, or that a key reacts first time you press and then every [insert_number] of loops. What’s the problem?
The problem so far is that when the user slightly taps a key, the faster the computer is the more keyboard events get processed for that action. For example the player shoots across the screen moving 19 spaces instead of 1 space he wanted to move.
I have tested two different variations of the multikey input (see above), and both have this problem.
Another option I have considered is this (maybe what you are referring to here?). When a multikey event is detected, process the input. Continue checking this same multikey event and looping until the key is released. The problem with this approach is that the key can't be held down to issue multiple events, it has to be pressed and released for each move. So if the user holds down the key for n time, then issue another of the same key events.
The problem with using multikey for this approach is that the game is designed to process a single player action at a time. Multikey is designed to process more than one. So I have to poll every possible key, and then trap each one individially.
With Inkey I can wait for an event, and then process it without checking every other possible event or trapping any of them.