By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,035 Members | 1,471 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,035 IT Pros & Developers. It's quick & easy.

Simultaneous keypresses in Pong game

P: n/a
Hi,
i have created a Pong game Application where two players control their
pads using the keyboard. the problem is that one player is using the
action keys
VK_UP and VK_DOWN in keyPressed() and the other, characters 'w' and
's' in keyTyped(). when both players hit a key simultaneously and keep
it pressed then only one of the two pads move. on the other hand if
both hit their keys fast then everything works ok. i declared both
keyPressed and keyTyped as "synchronized" but it doesn't seem to work.
what can i do in order to process them simultaneously? there is a run
method in my application as well.

thank you
Jul 17 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.