Backing track sync issues

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:

  1. 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.

  2. 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!


Could I get you to provide code snippets for your “reset function”, as well as the code you’re using to play the event?

It ended up being that we needed to set our backing track sound assets to “not stream.” Thank you!

It’s great to hear that you’ve resolved your issue. For some context, since streaming assets are loaded piece-meal on demand, they can never be played with exact, sample-accurate timing, and can incur extra latency compared to non-streaming assets.

For more info, I’d recommend reading over the Loading Modes section of the Studio docs’ Managing Assets chapter, and the API Docs Glossary section on Sound that details the different sounds types and their tradeoffs.