For a short summary, my team is making a game similar in many ways to Geometry Dash, particularly in the sense that when a player dies in the level, they are immediately either sent to the start of the level or their last collected checkpoint, and the backing track is consistently synced up.
We have fully implemented the checkpoint system both in Unity (using a reset function and checkpoint variables) and in FMOD (using transition regions, markers, and parameters). In the image attached is an example of how we implemented the Level 2 backing track. Note that the marker denoted “Sample 1” is the start of the level (considered to be the first automatic checkpoint the player collects).
The SampleNumber parameter gets appropriately assigned from the Unity code. We are facing two main issues, both in the Unity editor and in the build:
-
On the first playthrough of the level, the backing track is always slightly off sync (it starts playing slightly too early). Once the player dies for the first time (by colliding with an obstacle), this is no longer an issue and the backing track is perfectly in sync. This happened even if we called the reset function at the beginning of the level instead of just relying on Unity’s Start function.
-
After completing an entire level and pressing the restart level button (which calls the same reset function as if you were to die at the start of the level without having collected any checkpoints), the backing track often does not play at all and there is complete silence.
I would really love to hear any advice as to how to fix these issues!