rosu-pp
A standalone crate to calculate star ratings and performance points for all osu! gamemodes.
Conversions between gamemodes are generally not supported.
Async is supported through features, see below.
Usage
use File;
use ;
let file = match open ;
// Parse the map yourself
let map = match parse ;
// If `BeatmapExt` is included, you can make use of
// some methods on `Beatmap` to make your life simpler.
let result = map.pp
.mods // HDHR
.combo
.misses
.accuracy
.calculate;
println!;
// If you intend to reuse the current map-mod combination,
// make use of the previous result!
// If attributes are given, then stars & co don't have to be recalculated.
let next_result = map.pp
.mods // HDHR
.attributes // recycle
.combo
.misses
.n50
.passed_objects
.accuracy
.calculate;
println!;
let stars = map.stars.stars; // HR
let max_pp = map.max_pp.pp;
println!;
With async
If either the async_tokio or async_std feature is enabled, beatmap parsing will be async.
use File;
// use tokio::fs::File;
let file = match open.await ;
// Parse the map asynchronously
let map = match parse.await ;
// The rest stays the same
let result = map.pp
.mods // HDHR
.combo
.misses
.accuracy
.calculate;
println!;
Features
| Flag | Description |
|---|---|
default |
Enable all modes. |
osu |
Enable osu!standard. |
taiko |
Enable osu!taiko. |
fruits |
Enable osu!ctb. |
mania |
Enable osu!mania. |
async_tokio |
Beatmap parsing will be async through tokio |
async_std |
Beatmap parsing will be async through async-std |
Accuracy
Here are some plots showing the differences of rosu-pp's values and osu!'s official osu-tools.
Note that osu-tools was used on this commit which is currently (2021-11-14) accurate for osu!standard but for other modes it might include changes that were not applied into stable and thus not implemented in rosu-pp.
osu!standard: (very accurate, flashlight has the highest average but is still very small)
osu!mania: (close to perfect values)
osu!catch: (pretty accurate)
osu!taiko: (decently accurate, potentially more imprecise due to non-live changes in osu-tools)