|
-
May 14th, 2002, 08:35 PM
#1
Thread Starter
New Member
Painful Keyboard question
im trying to make a game thats a 2 player sub shooting game
sub1 at 1 side and sub2 at another
keys are W,A,S,D for sub1
and up, down, left, right for sub2
the problem is, it wont work when u press 2 keys at the same time
it gotta reconize all keys simultaneosly
how????
please email me at [email protected]
thanx alot
-
May 14th, 2002, 09:15 PM
#2
Keep a list of all of the keys that are down at any one time, and react to that data, instead of direct KeyDown and KeyUp messages that come through your application.
Be aware, though, that most keyboards can only support at most 5 or 6 keys down at one time, because of how keyboards are made (not a software thing, its actually the keyboard that causes the problem).
Z.
-
May 15th, 2002, 02:51 PM
#3
Thread Starter
New Member
yeah thats what ive been doing
thanx alot
but i need some sample code
this is giving me alot of painful headaches lately
-
May 17th, 2002, 10:29 AM
#4
Frenzied Member
like zaie said most keyboards wont accept more than 5 keys at a time (some only 3!) maybe it's also an issue of the pc, that I don't know
but for at least getting as many keys as your keyboard supports use the GetKeyState API
Sanity is a full time job
Puh das war harter Stoff!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|