mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 00:42:55 +08:00
Delay beatmap load until after transition has finished
Previously the beatmap would begin loading at the same time the `PlayerLoader` class was. This can cause a horribly visible series of stutters, especially when a storyboard is involved. Obviously we should be aiming to reduce the stutters via changes to the beatmap load process (such as incremental storyboard loading, `DrawableHitObject` pooling, etc.) but this improves user experience tenfold in the mean time.
This commit is contained in:
parent
85182b19fe
commit
27cd9e119a
@ -153,8 +153,6 @@ namespace osu.Game.Screens.Play
|
|||||||
{
|
{
|
||||||
base.OnEntering(last);
|
base.OnEntering(last);
|
||||||
|
|
||||||
prepareNewPlayer();
|
|
||||||
|
|
||||||
content.ScaleTo(0.7f);
|
content.ScaleTo(0.7f);
|
||||||
Background?.FadeColour(Color4.White, 800, Easing.OutQuint);
|
Background?.FadeColour(Color4.White, 800, Easing.OutQuint);
|
||||||
|
|
||||||
@ -172,11 +170,6 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
contentIn();
|
contentIn();
|
||||||
|
|
||||||
MetadataInfo.Loading = true;
|
|
||||||
|
|
||||||
// we will only be resumed if the player has requested a re-run (see restartRequested).
|
|
||||||
prepareNewPlayer();
|
|
||||||
|
|
||||||
this.Delay(400).Schedule(pushWhenLoaded);
|
this.Delay(400).Schedule(pushWhenLoaded);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -257,6 +250,9 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
private void prepareNewPlayer()
|
private void prepareNewPlayer()
|
||||||
{
|
{
|
||||||
|
if (!this.IsCurrentScreen())
|
||||||
|
return;
|
||||||
|
|
||||||
var restartCount = player?.RestartCount + 1 ?? 0;
|
var restartCount = player?.RestartCount + 1 ?? 0;
|
||||||
|
|
||||||
player = createPlayer();
|
player = createPlayer();
|
||||||
@ -274,8 +270,10 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
private void contentIn()
|
private void contentIn()
|
||||||
{
|
{
|
||||||
content.ScaleTo(1, 650, Easing.OutQuint);
|
MetadataInfo.Loading = true;
|
||||||
|
|
||||||
content.FadeInFromZero(400);
|
content.FadeInFromZero(400);
|
||||||
|
content.ScaleTo(1, 650, Easing.OutQuint).Then().Schedule(prepareNewPlayer);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void contentOut()
|
private void contentOut()
|
||||||
|
Loading…
Reference in New Issue
Block a user