1

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

Tetrad
  • 30,124
  • 12
  • 94
  • 143
user729053
  • 147
  • 1
  • 5

1 Answers1

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.

Tetrad
  • 30,124
  • 12
  • 94
  • 143
  • 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 05 '11 at 22:13