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

Compute lifetime start from entry for scrolling hit objects #20570

Merged
merged 5 commits into from
Oct 5, 2022

Conversation

ekrctb
Copy link
Collaborator

@ekrctb ekrctb commented Oct 4, 2022

Fix #16440

@peppy peppy self-requested a review October 4, 2022 07:29
@@ -23,10 +23,6 @@ public abstract class DrawableManiaHitObject : DrawableHitObject<ManiaHitObject>

protected readonly IBindable<ScrollingDirection> Direction = new Bindable<ScrollingDirection>();

// Leaving the default (10s) makes hitobjects not appear, as this offset is used for the initial state transforms.
// Calculated as DrawableManiaRuleset.MAX_TIME_RANGE + some additional allowance for velocity < 1.
protected override double InitialLifetimeOffset => 30000;
Copy link
Sponsor Member

@peppy peppy Oct 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this will provide quite a good performance boost in mania due to less notes being alive. (did a quick check but hard to say due to the old behaviour actually limiting the upper number of objects in a weird way).

@peppy
Copy link
Sponsor Member

peppy commented Oct 4, 2022

Can confirm this also fixes edge cases in osu!mania

Before:

osu.2022-10-04.at.07.37.36.mp4

After:

osu.2022-10-04.at.07.38.28.mp4

Copy link
Contributor

@smoogipoo smoogipoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm. iirc the reason this wasn't merged last time was due to the 100px initial size, but I think this is better than what we have in any case.

@smoogipoo smoogipoo merged commit c52ddb0 into ppy:master Oct 5, 2022
@ekrctb ekrctb deleted the scrolling-lifetime branch October 5, 2022 11:46
@peppy
Copy link
Sponsor Member

peppy commented Oct 6, 2022

@ekrctb it seems like this change has regressed head notes in mania holds somehow:

without this PR:

osu.Game.Rulesets.Mania.Tests.2022-10-06.at.10.08.35.mp4

with this PR:

osu.Game.Rulesets.Mania.Tests.2022-10-06.at.10.06.45.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Slow scroll speed causes hitobjects to "load in" on the playfield
3 participants