readme & minor doc adjustment
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
[](https://crates.io/crates/rosu-pp) [](https://docs.rs/rosu-pp)
|
||||
|
||||
# rosu-pp
|
||||
|
||||
A standalone crate to calculate star ratings and performance points for all [osu!](https://osu.ppy.sh/home) gamemodes.
|
||||
@@ -59,9 +61,8 @@ println!("Stars: {} | Max PP: {}", stars, max_pp);
|
||||
### osu!standard versions
|
||||
|
||||
- `all_included`: Both stack leniency & slider paths are considered so that the difficulty and pp calculation immitates osu! as close as possible. Pro: Most precise; Con: Least performant.
|
||||
- `no_leniency`: The positional offset of notes created by stack leniency is not considered. This means the jump distance inbetween notes might be slightly off, resulting in small inaccuracies. Since calculating these offsets is relatively expensive though, this version is faster than `all_included`.
|
||||
- `no_slider_no_leniency` (i.e. [oppai](https://github.com/Francesco149/oppai-ng)): In addition to not considering the positional offset caused by stack leniency, slider paths are also ignored. This means
|
||||
the travel distance of notes is completely omitted which may cause further inaccuracies. Since the slider paths don't have to be computed though, it is generally faster than `no_leniency`.
|
||||
- `no_leniency`: The positional offset of notes created by stack leniency is not considered. This means the jump distance inbetween notes might be slightly off, resulting in small inaccuracies. Since calculating these offsets is relatively expensive though, this version is considerably faster than `all_included`.
|
||||
- `no_slider_no_leniency` (i.e. [oppai](https://github.com/Francesco149/oppai-ng)): In addition to not considering the positional offset caused by stack leniency, slider paths are also ignored. This means the travel distance of notes is completely omitted which may cause further inaccuracies. Since the slider paths don't have to be computed though, it is generally faster than `no_leniency`.
|
||||
|
||||
**Note**: If the `fruits` feature is enabled, sliders will be parsed regardless, resulting in a reduced performance advantage of `no_sliders_no_leniency`.
|
||||
|
||||
@@ -74,27 +75,9 @@ the travel distance of notes is completely omitted which may cause further inacc
|
||||
| `fruits` | Enable osu!ctb. |
|
||||
| `mania` | Enable osu!mania. |
|
||||
| `osu` | Enable osu!standard. Requires to also enable exactly one of the features `no_leniency`, `no_sliders_no_leniency`, or `all_included`. |
|
||||
| `no_leniency` | When calculating difficulty attributes in osu!standard, ignore stack leniency but consider sliders. Solid middleground between performance and precision, hence the default version. |
|
||||
| `no_leniency` | When calculating difficulty attributes in osu!standard, ignore stack leniency but consider sliders. Solid middleground between performance and precision, hence the default version. |
|
||||
| `no_sliders_no_leniency` | When calculating difficulty attributes in osu!standard, ignore stack leniency and sliders. Best performance but slightly less precision than `no_leniency`. |
|
||||
| `all_included` | When calculating difficulty attributes in osu!standard, consider both stack leniency and sliders. Best precision but worse performance than `no_leniency`. |
|
||||
|
||||
### Benchmarks
|
||||
|
||||
Comparing the PP calculation speed between [osu-perf](https://gitlab.com/JackRedstonia/osu-perf/), an [oppai-ng](https://github.com/Francesco149/oppai-ng) rust binding, and rosu-pp's `no_sliders_no_leniency`:
|
||||
|
||||
<img src="./benchmark_results/crates_pp_calc.svg">
|
||||
|
||||
Comparing the PP calculation speed between rosu-pp's `all_included`, `no_leniency`, and `no_sliders_no_leniency` versions:
|
||||
|
||||
<img src="./benchmark_results/rosu_pp_calc.svg">
|
||||
|
||||
Comparing the PP (in)accuracy between rosu-pp's `all_included`, `no_leniency`, and `no_sliders_no_leniency` versions:
|
||||
|
||||
<img src="./benchmark_results/pp_inaccuracy.svg">
|
||||
|
||||
Comparing the stars (in)accuracy between rosu-pp's `all_included`, `no_leniency`, and `no_sliders_no_leniency` versions:
|
||||
|
||||
<img src="./benchmark_results/stars_inaccuracy.svg">
|
||||
| `all_included` | When calculating difficulty attributes in osu!standard, consider both stack leniency and sliders. Best precision but significantly worse performance than `no_leniency`. |
|
||||
|
||||
### Roadmap
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
[](https://crates.io/crates/rosu-pp) [](https://docs.rs/rosu-pp)
|
||||
|
||||
# {{crate}}
|
||||
|
||||
{{readme}}
|
||||
+5
-11
@@ -4,7 +4,7 @@
|
||||
//!
|
||||
//! Conversions are generally not supported.
|
||||
//!
|
||||
//! ### Usage
|
||||
//! ## Usage
|
||||
//!
|
||||
//! ```rust,no_run
|
||||
//! use std::fs::File;
|
||||
@@ -56,7 +56,7 @@
|
||||
//! println!("Stars: {} | Max PP: {}", stars, max_pp);
|
||||
//! ```
|
||||
//!
|
||||
//! ### osu!standard versions
|
||||
//! ## osu!standard versions
|
||||
//!
|
||||
//! - `all_included`: Both stack leniency & slider paths are considered so that the difficulty and pp calculation immitates osu! as close as possible. Pro: Most precise; Con: Least performant.
|
||||
//! - `no_leniency`: The positional offset of notes created by stack leniency is not considered. This means the jump distance inbetween notes might be slightly off, resulting in small inaccuracies. Since calculating these offsets is relatively expensive though, this version is considerably faster than `all_included`.
|
||||
@@ -64,7 +64,7 @@
|
||||
//!
|
||||
//! **Note**: If the `fruits` feature is enabled, sliders will be parsed regardless, resulting in a reduced performance advantage of `no_sliders_no_leniency`.
|
||||
//!
|
||||
//! ### Features
|
||||
//! ## Features
|
||||
//!
|
||||
//! | Flag | Description |
|
||||
//! |-----|-----|
|
||||
@@ -77,7 +77,7 @@
|
||||
//! | `no_sliders_no_leniency` | When calculating difficulty attributes in osu!standard, ignore stack leniency and sliders. Best performance but slightly less precision than `no_leniency`. |
|
||||
//! | `all_included` | When calculating difficulty attributes in osu!standard, consider both stack leniency and sliders. Best precision but significantly worse performance than `no_leniency`. |
|
||||
//!
|
||||
//! ### Roadmap
|
||||
//! ## Roadmap
|
||||
//!
|
||||
//! - osu sr versions
|
||||
//! - \[x\] all included
|
||||
@@ -146,13 +146,9 @@ pub use parse::{
|
||||
|
||||
pub trait BeatmapExt {
|
||||
/// Calculate the stars and other attributes of a beatmap which are required for pp calculation.
|
||||
///
|
||||
/// For osu!standard maps, the `no_leniency` version will be used.
|
||||
fn stars(&self, mods: impl Mods, passed_objects: Option<usize>) -> StarResult;
|
||||
|
||||
/// Calculate the max pp of a beatmap if that is all you want.
|
||||
///
|
||||
/// For osu!standard maps, the `no_leniency` version will be used.
|
||||
/// Calculate the max pp of a beatmap.
|
||||
///
|
||||
/// If you seek more fine-tuning and options you need to match on the map's
|
||||
/// mode and use the mode's corresponding calculator, e.g. [`TaikoPP`](crate::TaikoPP) for taiko.
|
||||
@@ -169,8 +165,6 @@ pub trait BeatmapExt {
|
||||
/// instead of evaluating the final strains, they are just returned as is.
|
||||
///
|
||||
/// Suitable to plot the difficulty of a map over time.
|
||||
///
|
||||
/// For osu!standard maps, the `no_leniency` version will be used.
|
||||
fn strains(&self, mods: impl Mods) -> Strains;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user