Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Input Key Down
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
santabruzer




PostPosted: Fri Jan 02, 2004 1:29 am   Post subject: Input Key Down

well, i'm doing my ISU, and basically i just don't like the whole idea of filling up the buffer and releasing it at one place.. is there a better way to do this.. (my program has really crappy keyboard response, with only 1 delay..)
Sponsor
Sponsor
Sponsor
sponsor
Mazer




PostPosted: Fri Jan 02, 2004 8:04 am   Post subject: (No subject)

you could just make another array of characters to hold which keys are down for a longer amount of time. i don't know if that'll make any sense, could you specify what you are trying to do by not clearing the buffer right away?
Tony




PostPosted: Fri Jan 02, 2004 2:37 pm   Post subject: (No subject)

filling up the buffer - thats how getch works. Input remains in memory untill it is read.

InputKeyDown on other hand just checks what keys are physically being pressed down at the moment the command is colled. You'll never check if the user EVER presses "q" button if it is not part of your controls.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
santabruzer




PostPosted: Sat Jan 03, 2004 6:26 pm   Post subject: (No subject)

hmm didn't know.. but anyways, the whole program works so blocky.. it's kinda weird... I know it's the global delay that is causing it, but when i try to use Time.Elapsed and use that as a singular delay the program begins to skip commands, and the keyboard basically becomes too sensitive.. what i'm wondering, is how does everyone else do it... Question ..
for example. Evasive manuvers has pretty good keyboard...
Tony




PostPosted: Sat Jan 03, 2004 6:27 pm   Post subject: (No subject)

oh, I know what you need!

there's a great tutorial on FPS (Frames Per Second) Very Happy I think that's what you're looking for.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
santabruzer




PostPosted: Sat Jan 03, 2004 6:29 pm   Post subject: (No subject)

ha ha.. i dunnu.. maybe... wonder where it is..
Tony




PostPosted: Sat Jan 03, 2004 6:38 pm   Post subject: (No subject)

have you tried looking under [turing tutorals] Laughing
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
santabruzer




PostPosted: Sat Jan 03, 2004 7:44 pm   Post subject: (No subject)

yea, i found.. now to learn how to use modules...
AsianSensation




PostPosted: Sat Jan 03, 2004 11:04 pm   Post subject: (No subject)

Modules? I didn't write the tutorial with Modules.....
santabruzer




PostPosted: Sun Jan 04, 2004 12:50 am   Post subject: (No subject)

it's the link though
8)
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 10 Posts ]
Jump to:   


Style:  
Search: