Francesco149 / oppai-ng

difficulty and pp calculator for osu!. better, smaller, faster rewrite of https://github.com/Francesco149/oppai
The Unlicense
156 stars 36 forks source link

on slider calcs #42

Open Francesco149 opened 5 years ago

Francesco149 commented 5 years ago

with the new system sliders affect star rating a lot more

I will think about adding slider calculations for better accuracy on maps that have a lot of sliders, however it won't happen anytime soon - I don't want to add low quality code

they will be added if I can implement it in few lines of code without adding too much complexity

Francesco149 commented 5 years ago

if i remember correctly .osu files provide some length for sliders so maybe normalizing that would be a close enough approximation, or maybe it's what lazer is actually using? gotta check

omkelderman commented 5 years ago

dont slider-lines in .osu files have the length in them? Idk how up to date https://osu.ppy.sh/help/wiki/osu%21_File_Formats/Osu_%28file_format%29 is, but there it says one of the things there is the pixellength, and it also lists a formula to calc the duration

or am I misunderstanding something here lol

Francesco149 commented 5 years ago

yea thats what I pointed out in my 2nd comment. if it's not the "lazy" length (like old slidercalc) but just the slider length then it should be possible to implement it with few lines of code, im already using that length in taiko

Francesco149 commented 5 years ago

hmm nope, it seems to be the lazy distance. but yeah I think i'll still try using the pixel length or w/e as an approximation https://github.com/ppy/osu/pull/3839/files#diff-b874c7fc814219aca9e1a1d700f90713

omkelderman commented 5 years ago

oh uh, I have no idea about this "lazy distance" stuff welp xd

Francesco149 commented 5 years ago

lazy distance is a simulation of following the approximate slider radius while moving the least possible, basically the minimum movement possible to get a 300 on the slider. it nerfs sliders that you dont have to fully follow

it's stupidly complex to compute because you have to literally implement all the slider curves to calculate the tick positions etc

omkelderman commented 5 years ago

ooooooooooooooooh right that makes a crapton of sense, yeee I can see that is a pain to implement ooof

Francesco149 commented 5 years ago

soo worst error so far is just under 6% on death dance, but most maps are within 0.6% error, so I still dunno if it's worth looking into this. will keep open

LeaPhant commented 5 years ago

For the sake of completeness, the worst error I know of is 17.5% on Tia - Deal with the devil (UndeadCarpulet).

badeu's score is 352.16pp according to oppai, 427.24pp according to the site.

Francesco149 commented 5 years ago

McKay's pull request improved death dance to 1.8% error and the average error is down to 0.3% on the test suite, so the threshold is back to +-2%

deal with the devil is still way off so this issue stays open

McKay42 commented 5 years ago

I've now fully implemented slider curves into the McOsu star/pp calculation, so if anyone is up for translating any of this to C code:

  1. Curves: OsuSliderCurves.h, OsuSliderCurves.cpp
  2. Ticks/ScoringTimes: OsuBeatmapDifficulty::calculateAllSliderTimesAndClicksTicks().
  3. Stacks: OsuBeatmapDifficulty::generateDifficultyHitObjectsForBeatmap().
  4. DistanceCalc/OsuDifficultyHitObject: OsuDifficultyCalculator.h, OsuDifficultyCalculator.cpp

Delta is < 0.1% (average over 10000 beatmaps, including a lot of aspire/ming/2B maps, so probably even lower).

Outliers are only like 3 ming maps which differ by entire stars, mainly due to me limiting all floats to sane values during parsing, e.g. https://osu.ppy.sh/beatmapsets/594828#osu/1258033 (8.07 vs 9.18)

Francesco149 commented 5 years ago

cool! still unsure about including full blown slider calc, it's a lot of code, potentially slow and only helps a lot on fast slider maps which could be considered outliers. I feel like if you need 1:1 calcs you should just use osu itself, or lazer, or McOsu. legacy oppai used to have slider calcs but i removed them for these very reasons (my method for approximating curves probably wasnt the best anyway). eventually ill implement it in a branch and see how I feel about it.

omkelderman commented 5 years ago

at least having an option would be cool probably. I'm sure there's ppl out there who are less worried about things being slightly slower because of it.

Also what also might be cool is have an option to somehow split star-calc and pp-calc. So you input beatmap+mods and you get stars (here is where the "expensive" slider calc happens right?) and then you cache those numbers somewhere and then you input stars+score and you get pp. That way as long as the beatmap doesnt change you dont need to calc that stuff again (or am I missing something here now 🤔 )

LeaPhant commented 5 years ago

This is already possible by passing aim and speed stars parameters (3.23aim for example).

Francesco149 commented 5 years ago

well I'm looking to delete more code at the moment, and adding 1k lines of code for sliders seems too much

anyway the cli doesn't skip diff calc even if you override stars at the moment, but it will on the next release

LeaPhant commented 5 years ago

I'd also prefer to have the option, but I guess it might result in a fork if that's not the direction this project will steer towards. A solution like osu-tools is not viable for projects like ezpp so having a standalone implementation is desirable.

Francesco149 commented 5 years ago

well I will definitely implement it in a branch but it might not make it on the master branch

LeaPhant commented 5 years ago

Seems like the way to go.