Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Heeelp! Need Keyboard Input Help....(multiple keypresses)
I am working on a two-player, split screen game that is very keyboard intensive. Both players control their respective character via keyboard input. The character control is very fluid, but requires that the user hold down two or more keys (such as the 'up' AND 'left' keys to move in a diagonal direction. The problem is, I can not get the program to register more than three simultaneous keypresses. If player one is moving diagonally, then player two can only move up, down, left, or right as the fourth keypress does not register. If player one moves diagonally AND fires guns then player two cannot move at all! I am currently using the GetAsyncKeyState() API function inside of a do...while game loop. The players each have their own small form, which are child forms in an MDI. Please, please help as the game is complete except for this control issue. It pains me to not be able to share my game w/ family and friends because of this one little issue! I thank you in advance for your time and consideration on this problem!