ppy / osu

rhythm is just a *click* away!
https://osu.ppy.sh
MIT License
15.05k stars 2.22k forks source link

Fps drops in beatmaps with heavy storyboards #3756

Open zzhenryquezz opened 5 years ago

zzhenryquezz commented 5 years ago

I was playing the the map "Sukisuki Zecchoushou - Kano" in the osuLazer that have a heavy storyboard.

So in certain part of the game-play the fps have a huge drop, like 40fps and 20fps. I testing with vsyn mode and unlimited fps mode and the same thing happens.

I test with other maps too, that have lighter storyboard but nothing happens, so could be something like a functionality that only this map have.

So I the problem could be in the storyboard because if you deactivate it, the game will work normally in 300fps or more with no problem.

My PC: OS: Linux Manjaro KDE 64bits Intel Pentium G4560 Nvidia GTX 1060 3gb Ram 8 gb DDR4 HD 1 Tera

Video that shows the issue: Link of the Video

Osu!lazer version: osu-lazer-git 2018.1120.0-1 get for AUR

Logs: database.log debug.log performance.log runtime.log

smoogipoo commented 5 years ago

Heavy storyboards will result in some frame drops. They can perhaps be optimised a little bit more but they’re already pretty well off and pretty much on-par with osu!stable.

Marking as low priority.

Morilli commented 5 years ago

they’re already pretty well off and pretty much on-par with osu!stable.

I'd like to disagree with that statement. Heavy storyboards drain fps much more in lazer than they do in stable. For example in this map, I can get ~400 fps in stable, yet only ~45 in lazer, making it already lower than the monitor refresh rate, which is always bad. So I'd argue either storyboards are way off from being optimised or something else is causing fps to drop that low. Edit: Sorry, I've messed up the numbers. Lazer seems to run at an average of 90 fps in that map (which is still lower than I'd expect) and staable at over 1000 fps.

zzhenryquezz commented 5 years ago

I see, indeed the game work well with the other maps. But i agree with the morilli, in this case the OsuLazer loses for the Osu!stable in the fps, i play in the two games and i still can play in the Osu!stable with stability, but in the OsuLazer sometimes i can't even play because of the aggressive drop Frames. But i still can play if i disable the storyboard, and this issue just happens with some maps, so don't need to have so much priority anyway.

DCNick3 commented 5 years ago

There is similar issue on ginkiha - EOS by alacat. The fps becomes lower and lower during play (minimum is 40 fps for me).

Here is a video: https://files.catbox.moe/6tkbrk.mp4

abbradar commented 5 years ago

Similar issue with this Taiko map, with storyboard enabled Update FPS drops from 240 to ~34 on a high-end system (Ryzen 7, 1080Ti) and stays consistently like that during the whole map, from start to finish. Resolution doesn't affect this, and Draw FPS drops to the level of Update which leads me thinking that it may not be a graphics problem.

Yutsuten commented 5 years ago

Lazer lags pretty hard on my pc when playing Trail of Dust - TRakker, and that does not happen on stable at all...

smoogipoo commented 5 years ago

https://osu.ppy.sh/beatmapsets/139525#taiko/361158

This is a case where the transforms for many sprites starts at 0 with a duration of 0, and we can probably optimise this by adjusting such sprites to take their lifetime according to their alpha. I imagined this as a post-processing step only during gameplay or similar and should not be baked into the transforms, as this wouldn't be desired in the editor.

peppy commented 5 years ago

Whatever solution is implemented should scale across to the editor.

MikiraSora commented 4 years ago

Currently stoyboard (script and player) could be optimzed by these method:

  1. remove unused commands before playing.
  2. sprites/animations start_time/end_time is calculatable , even they contain triggers and loops.
  3. make the timeline which contain single command only as init value of sprite's transform.

osu!stable hasn't impl anything for optimzing osb script and other yet , so there are some storyboard run bad in old PC : 181957 416153

NatureHog commented 2 years ago

Recently I came across this map, which should be added to the list of "fps-dropping storyboards".

Another one I came across has some very slight but still noticeable fps drops.

01101sam commented 2 years ago

The same issue happened in this map Sendan Life (416153) which is a heavy storyboard I've tested it with osu!stable and osu!lazer, both gave different results.

FPS Compare
`osu!stable` `osu!lazer`

As you can see,

Environment

Version:

Specs:

Logs

After viewing the logs, it doesn't have much special, so I'll replace with video. It's a full record of the beatmap autoplay, hope it can help for "debugging" (or improvement).

(All links are Youtube)

peppy commented 2 years ago

Yes, it will happen for all storyboards.

NatureHog commented 2 years ago

Would it theoretically be possible to "render" the storyboard beforehand, and when the storyboard is played, display this "rendered" version instead of making the storyboard "from scratch" every time? I have to say I have absolutely no idea about C#, or this codebase, I just want to put this idea out there...

peppy commented 2 years ago

No further comments are required here for now. We'll get to fixing it.

smoogipoo commented 3 weeks ago

Another map: https://osu.ppy.sh/beatmapsets/139525#osu/348549 Just keeping a running track of maps in case the cause is different to any of the rest.