Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

For a school assignment I am planning to make a game similar to Jubeat Plus on the iPad. Right now, I have a counter that gives me each 16th note of a beat, I am reading out a Property List where I defined the time of each button when it should be pressed.

But I don't know how to add the animation. When a button should be pressed, the animation must be at some point already, whether it's a hit animation or a falling dot.

Can someone help me out please? even a feedback whether I'm doing this right or wrong


I don't know if i'm thinking at the right way Do I need to use the beats per minute, to calculate the seconds per beat. When this time is near my animation time I use the frame rate to animate my animation

Please correct me

share|improve this question

1 Answer 1

Well a solution would be to convert your beats to a time stamp. So a note that occurs on beat X in a song that's Y BPM would need to be hit at time (seconds) Z.

From there it's pretty simple to figure out when you need to start doing things. If you're doing your standard Guitar Hero/DDR style "highway" for notes, and going from the start of the highway to the bar that signifies when you need to hit the beat takes constant time W, then you need to spawn your note object in the world at time Z - W.

share|improve this answer
    
At this moment I think I have the code to add the animation. Do you also know how I add an animation into a CCMenuItem on event? or another options to play the animation on the button(CCMenuItem) –  user729053 Sep 5 '11 at 22:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.