chrislo27 / PolyrhythmMania

A game that faithfully recreates the Polyrhythm minigame from Rhythm Tengoku (リズム天国), with a built-in level editor
https://polyrhythmmania.rhre.dev
GNU General Public License v3.0
237 stars 18 forks source link

[Bug]: Story Mode - Setting audio offset desyncs Robot MODE #53

Closed vinceiis closed 1 year ago

vinceiis commented 1 year ago

Version

v2.0.1-20230506a

Operating System

Windows 10

Problem Description

Cues in the Robot MODE level occur at the wrong times after restarting the level if offset is negative. Most things including sounds, cues, and music desync if offset is positive.

Steps to Reproduce Problem

For negative offset:

  1. Set audio offset below 0
  2. Start Robot MODE and wait until the opening scene finishes
  3. Restart the level in any way that skips the opening scene (Start Over in pause menu, Start Over after failure)

For positive offset:

  1. Set audio offset above 0
  2. Start Robot MODE

Relevant log output

No response

(Optional) Other useful information

No response

chrislo27 commented 1 year ago

Thanks for the report. Can you please record an upload a video for the scenarios you described? I've tried running the two scenarios myself and it seems alright with either offset (pos/neg), at least audio-wise. With the positive case, the robot sounds for the dialogue are delayed but that seems to be expected.

vinceiis commented 1 year ago

Negative: (Notice how the audio is timed fine until i start the level over) https://user-images.githubusercontent.com/101846355/236710271-c21ad9bd-6509-4190-8373-6c504b8e6325.mp4

Positive: https://user-images.githubusercontent.com/101846355/236710293-e7acad65-56dd-4e3f-a444-eb89482adbc3.mp4

vinceiis commented 1 year ago

After further testing, it seems like Endless mode (also Daily Challenge) slowly desyncs with every speedup as well

chrislo27 commented 1 year ago

Thanks for the videos, they definitely illustrate the problem very well. I will look into a fix for this.

Out of curiosity, what offset settings were you using? I'm assuming they were pretty significant (more than +/- 300 ms)?

vinceiis commented 1 year ago

For video purposes to show the problem more clearly I used max settings (±500) but issues are still noticable at my usual offset of -190

chrislo27 commented 1 year ago

I believe the negative audio issue (after starting over) only persists for a little while. The music seems to skip after a few measures but I think it's normal after that. Can you confirm this?

For the positive offset case, it's an issue with how the music auto-adjusts in case there was frame lag -- that will be fixed.

(And the robot SFX for the textboxes being offset will be changed too)

vinceiis commented 1 year ago

Yeah, negative offset fixes itself after the intro audio file is done playing (but it doesn't apply for the issue I encountered with Endless mode slowly desyncing)

chrislo27 commented 1 year ago

I've resolved the issue regarding negative audio offsets and the boss. I will try to get a patch out soon-ish (this weekend at earliest depending on pre-releases etc). If you're interested in testing it out by building the game locally, the fix is in the master branch already.

As for the Endless Mode desync, I will not address it in this issue to keep it focused to the issue with the boss. Feel free to open another issue for that as it'll be easier to track and investigate.

Thanks for reporting! I will close this issue manually once the release with the fix is out.

chrislo27 commented 1 year ago

Fix released with v2.0.2.