Computer Science Canada

Input Key Down

Author:  santabruzer [ 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..)

Author:  Mazer [ Fri Jan 02, 2004 8:04 am ]
Post 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?

Author:  Tony [ Fri Jan 02, 2004 2:37 pm ]
Post 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.

Author:  santabruzer [ Sat Jan 03, 2004 6:26 pm ]
Post 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...

Author:  Tony [ Sat Jan 03, 2004 6:27 pm ]
Post 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.

Author:  santabruzer [ Sat Jan 03, 2004 6:29 pm ]
Post subject: 

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

Author:  Tony [ Sat Jan 03, 2004 6:38 pm ]
Post subject: 

have you tried looking under [turing tutorals] Laughing

Author:  santabruzer [ Sat Jan 03, 2004 7:44 pm ]
Post subject: 

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

Author:  AsianSensation [ Sat Jan 03, 2004 11:04 pm ]
Post subject: 

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

Author:  santabruzer [ Sun Jan 04, 2004 12:50 am ]
Post subject: 

it's the link though
8)


: