Results 1 to 4 of 4

Thread: Painful Keyboard question

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2002
    Posts
    3

    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

  2. #2
    Zaei
    Guest
    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.

  3. #3

    Thread Starter
    New Member
    Join Date
    May 2002
    Posts
    3
    yeah thats what ive been doing
    thanx alot
    but i need some sample code

    this is giving me alot of painful headaches lately

  4. #4
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    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
  •  



Click Here to Expand Forum to Full Width