Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Osu!CTB Replays are incorrect on maps with a very high note per second rate #26436

Open
patatitta opened this issue Jan 8, 2024 · 6 comments
Labels
area:replay priority:0 Showstopper. Critical to the next release. ruleset/osu!catch

Comments

@patatitta
Copy link

patatitta commented Jan 8, 2024

Type

Game behaviour

Bug description

While watching phob's replay on the map "Sonic Blaster" I noticed a great discrepancy between the play and the replay, while in the original play they FCed the map, in the replay, they missed very often.

Phob's play was realized on the current stable version of osu!, however, I did multiple tests on the same map on lazer and got similar results. I have seen this bug happen on more maps, like motion's play on pacific girl and dahcreepers NFDT fc on noxious. Most other maps seem to work perfectly, it's only these high note per second maps that are an issue.

I'm aware that refresh rate can affect the replays. All my screenshots were tested with ulimited FPS and no frame drops. Always played at 1.0x speed and always focusing on the window.

Screenshots or videos

Lazer original play
osu_2024-01-08_20-10-30
Replay end result
osu_2024-01-08_20-10-26
The mod only changes the HP to 0, forgot to remove it from a test earlier, map contains the first 16 second of the map

Phob's Original play
osu_2024-01-08_20-16-52
Phob's replay when watched in osu!lazer
osu_2024-01-08_20-19-43

Dahcreeper's Original play on Noxious
osu_2024-01-08_20-21-57
Dahcreeper's Play on noxious when watched in osu!lazer
osu_2024-01-08_20-23-55

Version

2023.1231.0-lazer

Logs

compressed-logs.zip

@patatitta patatitta changed the title Osu!CTB Replays are broken on maps with a very high note per second rate Osu!CTB Replays are incorrect on maps with a very high note per second rate Jan 8, 2024
@frenzibyte frenzibyte self-assigned this Jan 11, 2024
@frenzibyte
Copy link
Member

For reference, here is a close-up at one of the false misses while watching the replay:

CleanShot.2024-01-11.at.10.27.31.mp4

It appears that the catcher's position is being updated prior to marking the hyper dash fruit as judged. Unassigning for now as this does not look to be a simple one at my current state and knowledge of catch replay handling.

@frenzibyte frenzibyte removed their assignment Jan 12, 2024
@peppy peppy added the priority:0 Showstopper. Critical to the next release. label Jan 15, 2024
@peppy
Copy link
Sponsor Member

peppy commented Jan 15, 2024

Bumping this to priority 0. This needs immediate attention as it may cause issues with gameplay recorded on lazer too.

osu!catch is one of the examples where replays should never go wrong because we have guaranteed frame stability on all inputs.

@docflo7
Copy link

docflo7 commented Jan 17, 2024

Hello, in addition to what was reported by @patatitta, I'd like to add that I've seen this issue on simpler maps, with inconsistencies when playing the same replay several times in a row, which showed incorrect droplet counts.
(for example on YOASOBI - Idol (TV Size) with my replay)

Also, I've noticed that skipping in replays with the song progress bar led to completely messed up replays, which might be related to this. (But maybe a bit more expected due to how everything ends up being processed really fast ?)

@BlauFx
Copy link
Contributor

BlauFx commented Jan 25, 2024

Just asking: is #26104 a separate issue or related to this?

@bdach
Copy link
Collaborator

bdach commented Jan 25, 2024

this hasn't been investigated, so can't confirm or deny.

@cdwcgt
Copy link
Contributor

cdwcgt commented Feb 6, 2024

When errors occur in the catch replay of the lazer game, more serious errors will also occur in the stable, but shouldn't there be any difference in the playback of the two? I think?
cdwcgt playing Murasaki Hotaru - Re_TrymenT (AJamez) [Spec_s OverdosE] (2024-02-06_19-33).zip
https://osu.ppy.sh/scores/2298328975
this is my osr which in low bpm (HT applied) and always wrong in 1:01 303x combo
and playback frame by frame will also miss the 301x one

Hope this content is useful for investigation

notice that replay error in stable will reappear in lazer when frame by frame (or skip)

update:
image

Notice to key count, key count display in gameplay is different from replay.
Because the playback infers the pressed keys based on the catcher's position, there may be a problem with CatchReplayFrame?

bdach added a commit to bdach/osu that referenced this issue Apr 26, 2024
Intended as at least a partial solution to
ppy#26436. In testing, two of the three
replays from the issue are FCs with this change, and the third is
improved (and not fully fixed).

As it turns out, stable truncates the end time of sliders to integers:

    https://github.com/peppy/osu-stable-reference/blob/79addff0f5d2a328059d2842d6d2968cfb740956/osu!/GameplayElements/HitObjects/Osu/SliderOsu.cs#L1037

and the start time of all juice stream parts is also truncated to
integers:

    https://github.com/peppy/osu-stable-reference/blob/79addff0f5d2a328059d2842d6d2968cfb740956/osu!/GameplayElements/HitObjects/Fruits/SliderFruits.cs#L86-L166

This matters for replay playback when mappers push limits. For instance,
let's take one case from the issue. In one of the maps involved, there
was a juice-stream-ending fruit at time 7093.9655 according to lazer,
which was also a hyperfruit.

The broken replay on this map included one frame at time 7093, with the
catcher position before the hyperdash, and one frame at time 7097,
with the catcher position *after* the hyperdash. Which meant that
the replay handler moved *out of the way* of the hyperfruit at time
7093.9655, deciding that it is *after* the replay frame that was
supposed to be catching it.

(For reference, the relevant replay playback code is here:

    https://github.com/ppy/osu/blob/3da5831075b187e967ca300dcba0a6761f07d1dd/osu.Game.Rulesets.Catch/Replays/CatchFramedReplayInputHandler.cs#L20-L31

Note the handling of `position`. Any frame with an action is important,
which means that as long as any key is held, interpolation will not
take place.)

On stable this is not a thing, because the fruit's end time was being
truncated to `int`, therefore moving it back to time 7093 and restoring
temporal integrity.

This probably doesn't matter in other rulesets that much because
the input tolerances in something like osu! or taiko are much higher.
catch is rather knife-edge, what with mappers doing the "edge dash" /
"pixel jump" stuff (tl;dr: placing a circle just barely outside of
hyperdash range, so that a perfect normal dash is required to catch it).
Thus, this is applied locally to catch for now until proven necessary
to put it elsewhere too.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:replay priority:0 Showstopper. Critical to the next release. ruleset/osu!catch
Projects
None yet
Development

No branches or pull requests

7 participants