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

Edge hit note becomes a miss when watching back replay #25162

Closed
Natelytle opened this issue Oct 18, 2023 · 3 comments · Fixed by #25167
Closed

Edge hit note becomes a miss when watching back replay #25162

Natelytle opened this issue Oct 18, 2023 · 3 comments · Fixed by #25167

Comments

@Natelytle
Copy link
Contributor

Type

Game behaviour

Bug description

I was watching back Akolibed's play on Reign of Fear (https://osu.ppy.sh/scores/osu/4518727921) when I discovered that he misses at 1270 combo in lazer, but not in stable. I dug a little deeper using 2 replay parsing apps, and osu! rewind displays the lazer behaviour (a miss), and circleguard displays the stable behaviour (a hit).

Screenshots or videos

osu! rewind:
image

circleguard:
image

Lazer:
https://github.com/ppy/osu/assets/92956514/8e83a596-f646-458f-8a94-dea115ff9eb8

Stable:
https://github.com/ppy/osu/assets/92956514/b28ac5aa-868a-4536-873a-fb22ffc6f80e

Version

2023.1008.1-lazer

Logs

legacy-ipc.log
database.log
input.log
performance.log
network.log
runtime.log

@tybug
Copy link
Member

tybug commented Oct 18, 2023

My immediate guess, without looking at the replay or anything in detail, would be floating point differences in the hitradius calculation.

circleguard

def hitradius(CS):
    # attempting to match stable hitradius
    return np.float32(64 * ((1.0 - np.float32(0.7) * (float(np.float32(CS)) - 5) / 5)) / 2) * np.float32(1.00041)

rewind

export function circleSizeToScale(CS: number) {
  return float32((1.0 - (0.7 * (CS - 5)) / 5) / 2);
}

lazer

            Scale = (1.0f - 0.7f * (difficulty.CircleSize - 5) / 5) / 2

stable (I think?)

            float circleRadius = (PLAYFIELD_WIDTH / 16.0f) * (1.0f - 0.7f * (float)HitObjectManager.AdjustDifficulty(Beatmap.DifficultyCircleSize));

I'll be honest with you...I have no idea anymore where some of the casts or constants in the circleguard code came from (what is np.float32(1.00041) doing there??). But maybe this will be useful for anyone looking into this. Circleguard has matched stable in all cases I know of, fwiw.

@peppy
Copy link
Member

peppy commented Oct 18, 2023

Path forward would be to reimplement to match stable calculation-wise, I believe. Should try and simplify the equation down as much as possible.

Will add this to the project as it seems important.

@peppy peppy moved this to Needs implementation in Path to osu!(lazer) ranked play Oct 18, 2023
@peppy peppy self-assigned this Oct 18, 2023
@peppy peppy moved this from Needs implementation to In Progress in Path to osu!(lazer) ranked play Oct 18, 2023
@peppy
Copy link
Member

peppy commented Oct 18, 2023

I'll look into this one.

peppy added a commit to peppy/osu that referenced this issue Oct 18, 2023
This multiplier has to exist.

I'm not guaranteeing that the rest is correct here. Should we be doing
proper cross-testing on this? Maybe, but it's going to be hard to get
right. We could likely check as far as "game pixels", but there's still
a chance that the osu-framework could be doing something weird in the
rest of the hierarchy where playfield scale is involved.

Closes ppy#25162. Tested to fix the linked
replay.
@peppy peppy moved this from In Progress to In Review in Path to osu!(lazer) ranked play Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

3 participants