Go Back   FileForums > Games > General Gaming

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-06-2009, 03:11
jaypaul's Avatar
jaypaul jaypaul is offline
Registered User
 
Join Date: Apr 2009
Location: US
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
jaypaul is on a distinguished road
Question About Buffer of excess key presses in Java

Hi friends,

Right now, in the game I am working on, if the user presses a key multiple times the actions will be performed as many times as it registers, even though I disallow key presses during the time that the action is taking place.

For example, a move of 1 space can be carried out with a key press. While the character is moving, key presses are not allowed. However, if you just press the key 5 or 25 times, the character will just keep moving, once he's done with the first one.

What I need to do is clear the buffer of key presses after an action has taken place, so that the excess keys are not registered. I know the commands to do so in C++, but not in Java

Your Answers'll be Helpful.

Thanks
Paul
.
Reply With Quote
Sponsored Links
  #2  
Old 08-06-2009, 13:01
DABhand DABhand is offline
Banned
 
Join Date: Nov 2004
Location: Near my PC
Posts: 5,406
Thanks: 0
Thanked 3 Times in 3 Posts
DABhand is on a distinguished road
http://java.sun.com/products/jlf/ed1/dg/index.htm

Has everyone listed there.

Why didnt you go here first?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
wat is firmware and does 2mb buffer 4 mb buffer make a diff? Horze CD/DVD-Writers 1 22-12-2001 06:25



All times are GMT -7. The time now is 14:42.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
FileForums @ https://fileforums.com