3 releases
0.1.6 | May 20, 2022 |
---|---|
0.1.5 | May 16, 2022 |
0.1.4 | May 16, 2022 |
#495 in Games
20KB
499 lines
onshape-level-gen
An auto level generator for OnShape VR game
Download stable builds here.
Download nightly builds here.
lib.rs
:
This crate contains essential utilities to generate an OnShape yml level file.
Example
use onshape_level_gen::util::*;
// this difficulty is a FFT result iterating factor.
let init_difficulty_limit = 1.2f32;
let input_ogg = "~/your_target_file.ogg";
let output_yml = "~/level.yml";
let (samples, output_params) = get_data_from_ogg(input_ogg).unwrap();
let notes = get_notes_from_samples(samples, init_difficulty_limit).unwrap();
let walls = get_walls_from_notes(¬es);
let yml_content = gen_yml(&output_params, walls);
std::fs::write(output_yml, yml_content).unwrap();
Dependencies
~4MB
~142K SLoC