Ported osu!tp's beatmap difficulty algorithm to compute star ratings.

https://github.com/Tom94/AiModtpDifficultyCalculator
This might not be completely accurate as I wasn't able to get the original program to run, but it's probably close (note that hit object stacking isn't applied, though).

Since the computation is fairly expensive, they're currently done when selecting a beatmap set in the song menu (for all beatmaps in the set at once).  The rating is displayed next to the beatmap difficulty settings (HP,CS,AR,OD) in the header.  Also, since all the hit objects need to be loaded to perform the computation, the objects are later discarded (but not immediately) by a LRU cache to limit memory usage.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
Jeffrey Han
2015-09-02 19:44:04 -05:00
parent 8cb796bd18
commit c785a1261c
5 changed files with 634 additions and 6 deletions

View File

@@ -67,6 +67,9 @@ public class Beatmap implements Comparable<Beatmap> {
/** MD5 hash of this file. */
public String md5Hash;
/** The star rating. */
public double starRating = -1;
/**
* [General]
*/