Knowing beforehand when beats will happen (Rhythm minigame)

Hi everyone!

We’re adding a little minigame in an upcoming update where the player will play a rhythm minigame, press a button in timing with the music.

We will spawn button prompts in advance just like Guitar hero and other rhythm-based games.

How could we go about knowing in advance when our timeline markers/beat will happen?

Thanks for the help!

By settings markers one bar before in the timeline!
If your music is BPM constant, that should be quite easy.

So the first marker is just to say, hey spawn in the first, and then use FMOD’s beat callback for the rest?

If the BPM is constant would not be hard to copy around markers tho…!

I don’t really understand your problem. Use a callback at the moment you want your game to react. The first reaction you want is a visual prompt, so use a callback when you want that prompt. For the input, you can either use another callback, or deduce the right timing based on the prompt callback.