DDR help Music
Author |
Message |
monkow
|
Posted: Thu Nov 15, 2007 11:59 pm Post subject: DDR help Music |
|
|
alright im making a ddr game for my grade 10 class ISU and i was just wondering if there is a way to
make it so my arrows actually go with the song. I can assign the time when the arrows go up, but my comp somtimes lags and the song continues to play and i cant get the key's ot be consistantlly be at certain beats..
is there a way to make a keyframe for a song or w.e. like that |
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
Mazer

|
Posted: Fri Nov 16, 2007 12:32 am Post subject: RE:DDR help Music |
|
|
If the song plays at a consistent speed try looking into framerate independent movement.
When you say delay(x) chances are you'll be delayed by a little bit more due to the actual processing you're doing. So make sure you know how much time has actually passed when you move the arrows. |
|
|
|
|
 |
monkow
|
Posted: Fri Nov 16, 2007 2:59 pm Post subject: Re: DDR help Music |
|
|
how would i come about to make a fps display?
like how many frames are there per milliasecond?
i did the mat hand i got like .000030 frame per millisecond |
|
|
|
|
 |
Mazer

|
Posted: Fri Nov 16, 2007 5:17 pm Post subject: RE:DDR help Music |
|
|
FPS doesn't matter, that's the whole point. Find out how much time has passed since the last update and base your movement on that.
Have 0.013 seconds passed since the last update?
Want your arrow to move 15 pixels per second?
Move it by 15 * 0.013 pixels.
Use Time.Elapsed to get the amount of time that has passed since the program started.
I honestly don't know if this is guaranteed to make it work since any hiccup in audio playback could throw the whole thing out of sync. "Turing sucks" and whatever, right?
Best of luck, chum. |
|
|
|
|
 |
Degensquared
|
Posted: Fri Nov 16, 2007 11:44 pm Post subject: RE:DDR help Music |
|
|
The Time.DelaySinceLast command includes processing time in it's delay, that might work too.
Edit: There's one other thing I remembered. Turing's processes don't execute one line each, I believe that somone proved that it was almost random, so that would also pose a small problem, it may not be noticible at the begining of a song, but getting to the end of a kind of long song, you might find that the arrows would be a smidge faster or slower than the song. |
|
|
|
|
 |
|
|