英文看不懂OTL,只能来中文区求一下算法,就是那个几颗星难度是怎么计算的……最近在做一个管理地图的小工具需要用到,于是来求一下……万分感谢
pp够蠢了,如果的话不更……Breeze wrote:
星星算法太蠢可参考性并不高, 三星半的图可以蛋疼死你, 五星的图也可以超简单
与其花时间去找现在星星的算法不如想一个更具有参考性的难度算法推荐给老板
这个算法是对的dyx726 wrote:
我在贴吧里看到过一个算法可是我用上了之后发现不对……才来问的OTL……以为会有人知道http://tieba.baidu.com/p/1454997208
statementreply wrote:
这个算法是对的dyx726 wrote:
我在贴吧里看到过一个算法可是我用上了之后发现不对……才来问的OTL……以为会有人知道http://tieba.baidu.com/p/1454997208
嘛我算出来是和osu里一致dyx726 wrote:
statementreply wrote:
这个算法是对的
我用这个算法算出来的结果和OSU里的不相同……
int obj = circleCount + sliderCount * 2 + spinnerCount * 3;
if (obj == 0)
{
difficulty = 0.0;
}
else
{
int length = Convert.ToInt32(Math.Floor((lastObjectTime - firstObjectTime - breakTime) * 0.001));
double density = Convert.ToDouble(obj) / length;
double difficultySetting = hpDrainRate + circleSize + overallDifficulty;
if (sliderCount * 10 >= obj)
{
difficultySetting = 0.75 * (difficultySetting + Math.Max(0, Math.Min(10,
(1000.0 / timingPoints[0].millisecondsPerBeat * sliderMultiplier - 1.5) * 2.5)));
}
if (difficultySetting > 21.0)
{
difficulty = Math.Min(difficultySetting, 30.0) / 30.0 * 4.0 + 2.0 - Math.Pow(5.0 - density, 4) * 0.0032;
}
else if (density >= 2.5)
{
difficulty = Math.Min(difficultySetting, 18.0) / 18.0 + 4.0 - Math.Pow(Math.Max(5.0 - density, 0.0), 4) * 0.0143;
}
else if (density >= 1.0)
{
difficulty = Math.Min(difficultySetting, 18.0) / 18.0 + (density - 1.0) * 2.5;
}
else
{
difficulty = Math.Min(difficultySetting, 18.0) / 18.0 + 0.25;
}
difficulty = Math.Min(difficulty, 5.0);
}