Piano game reaction time.
Author |
Message |
spengler
|
Posted: Sun Jan 11, 2009 2:51 pm Post subject: Piano game reaction time. |
|
|
I am working on a turing program that is similar to guitar hero. The one problem I am having is having the buttons pressed within a certain amount of time of a light turning on and continuing on with the series of lights. If the button is pressed, the score increases. I do not know how to have the program wait for a certain amount of time for the parallelget before skipping it and going to the next note.
How do I make the if statement last for a certain amount of time? |
|
|
|
|
|
Sponsor Sponsor
|
|
|
The_Bean
|
Posted: Sun Jan 11, 2009 3:15 pm Post subject: Re: Piano game reaction time. |
|
|
It's hard to figure out what exactly the problem is without seeing whats going on.
Current Ideas:
-The ordering of the code inside the loop.
-The way your checking for a button click, and the position of the nodes on the board.
-Your not using for statements and arrays. |
|
|
|
|
|
Tony
|
Posted: Sun Jan 11, 2009 3:36 pm Post subject: RE:Piano game reaction time. |
|
|
the way those games typically work is that at the time of the button press (in Guitar Hero controller setup, it's at the time of the strum) the distance between the center of the target to the note is recorded. That distance could then be matched against the range, and if it's close enough - point counts.
DDR gives a gradient of points (Marvelous, Perfect, Great) depending on just how close you got; adding depth to the point system (as well as allowing someone with bad timing to not fail instantly). |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
|
|