Shorten storyboard sprite lifetimes during gameplay to reduce stutter#38012
Shorten storyboard sprite lifetimes during gameplay to reduce stutter#38012SK-la wants to merge 3 commits into
Conversation
Sprites that fade out often keep scale/move transforms running long after they become invisible. EndTimeForDisplay now ends at the last visible alpha (mirroring StartTime), so LifetimeManagementContainer stops updating them. Gameplay uses a dedicated DrawableStoryboard that enables RemoveCompletedTransforms so finished transforms can be reclaimed; the base type still keeps them for replay seek. Add StoryboardSpriteLifetimeTest with .osb fixtures using test-image.png to cover decoder paths, invisible-alpha fallback, and drawable LifetimeEnd.
|
There was an attempt at this by me, which got reverted since lazer and stable handle transforms differently. Basically this
|
Cover the original multi-flash fade sequence, visible alpha endings, and drawable animation lifetimes so display truncation cannot regress silently. The file `osu27627-multi-flash-sprite.osb` directly uses the example from osu#27627, which makes it more intuitive to understand. If these tests prove to be overly complicated, we can remove either one of the `TestOsu27627MultiFlashSpriteLifetime` / `TestMultiFlashSpriteLifetimeIsNotTruncatedAtFirstFadeOut` tests.
|
I found the beatmap mentioned in #27797 on the official website: https://osu.ppy.sh/beatmapsets/1388590#osu/2867851 (it should be the same one). The original client is 2026.525.0-tachyon. In the same position, it is like this: I need to further test the storyboard. |
The current PR version looks like this: Regarding #27797, further testing revealed that the current PR introduces a new issue: truncating lifetime + RemoveCompletedTransforms causes some wizard images to fail to display again. So this PR temporarily does not meet the merge requirements: optimization does not generate a new pending fix. At present, this PR seems like sacrificing some visual effects in certain scenarios to balance performance, which is not good. It takes some time to try to find new solutions. |
|
Judging from the last reply in this thread this is not ready. Converting to draft. |







Sprites that fade out often keep scale/move transforms running long after they become invisible. EndTimeForDisplay now ends at the last visible alpha (mirroring StartTime), so LifetimeManagementContainer stops updating them.
Gameplay uses a dedicated DrawableStoryboard that enables RemoveCompletedTransforms so finished transforms can be reclaimed; the base type still keeps them for replay seek.
Add StoryboardSpriteLifetimeTest with .osb fixtures using test-image.png to cover decoder paths, invisible-alpha fallback, and drawable LifetimeEnd.
This PR alleviates the issues associated with osu/issues/37952.
Improvements observed under debugging are limited and need to be tested after release. At the point where the problem occurred, the frame rate increased from 10 FPS to 100 FPS, barely maintaining normal input and judgement.