Help with an issue with audio and masks

Greetings!

The team is trying to develop a stage in which the user has to tap at a certain speed (72bpm), and we made a “click track” for it. When the tap occurs, a bar is supposed to fill and the user has to release at a certain point in the bar so he gets a “correct” answer.

We started to notice that, after 18 seconds into the game, the feedback from the game (the bar and the responses) was not “synchronized” with the audio track. So we asked the code to do the opposite: whenever it wasn’t tapped, the bar would fill up. 

The exercise begins stable and it starts to “lose” synchronicity until the point when it’s completely obvious they’re in different speeds. The team has been trying to solve this issue but, since none of them has a background in games (I’m not even the developer, just “the guy with the idea”), it’s been hard and slow, and we don’t want to fall behind on schedule.

This is how we have the exercise: 

  • A one minute mp3 track that is a 72bpm click

  • Two bars on top of each other

  • A mask that slides once the user starts to tap (or leaves it untapped)

  • A sound that reacts to the tap.

The idea is to have a rhythmic challenge, but we don’t know where is it going wrong. The goal is to have a steady flow in the bpm rhythm. Think of a musical piece that you have to follow but, for some reason, the audio and the metronome are not synchronized, even though they’re supposed to be the same speed.

Is it because of the audio file? Should we use just a single sound and have it loop as much as we need? Is the bar the problem?

Thanks for the help!

The below forum thread might help out a bit:

https://forums.coronalabs.com/topic/54004-rhythm-based-game-how-to-stay-in-sync

Thanks Alex@Panc! I’ll surely make the developers work on it!

The below forum thread might help out a bit:

https://forums.coronalabs.com/topic/54004-rhythm-based-game-how-to-stay-in-sync

Thanks Alex@Panc! I’ll surely make the developers work on it!