All Projects → HoLLy-HaCKeR → OppaiSharp

HoLLy-HaCKeR / OppaiSharp

Licence: Unlicense license
A C# port of oppai-ng

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to OppaiSharp

OsuParsers
Library for parsing/writing files associated with osu!
Stars: ✭ 60 (+275%)
Mutual labels:  osu, osugame
OsuMapSuggester
A Mirai console plugin that can provide osu!std players some appropriate beatmap (WIP)
Stars: ✭ 29 (+81.25%)
Mutual labels:  osu, osugame
Osu-Ingame-Downloader
Just a simple Osu! ingame downloader
Stars: ✭ 31 (+93.75%)
Mutual labels:  osu, osugame
tau
A customized osu! mode surrounding a paddle and some notes.
Stars: ✭ 150 (+837.5%)
Mutual labels:  osu, osugame
fnf-osu-mania-skin
A Friday Night Funkin' skin for all osu! modes.
Stars: ✭ 45 (+181.25%)
Mutual labels:  osu, osugame
ultimate osu analyzer
Python rewrite of my old osu analyzer that aims to be a lot more useful
Stars: ✭ 26 (+62.5%)
Mutual labels:  osu, osugame
dontsteal
Python 3 script to compare two osu! replays for similarities. (Kind of anti-cheat for replay stealing)
Stars: ✭ 13 (-18.75%)
Mutual labels:  osu, osugame
mappool-generator
A Mappool Generator for osu! Tournament Livestreams
Stars: ✭ 20 (+25%)
Mutual labels:  osu, osugame
IngameOverlay
Overlay in-game
Stars: ✭ 21 (+31.25%)
Mutual labels:  osu, osugame
Osumapper
An automatic beatmap generator using Tensorflow / Deep Learning.
Stars: ✭ 207 (+1193.75%)
Mutual labels:  osu
Mapping Tools
Collection of tools for manipulating osu! beatmaps
Stars: ✭ 85 (+431.25%)
Mutual labels:  osugame
Streamcompanion
osu! information extractor, ranging from selected map info to live play data
Stars: ✭ 161 (+906.25%)
Mutual labels:  osu
Danser Go
Dancing visualizer of osu! maps and custom osu! client written in Go.
Stars: ✭ 224 (+1300%)
Mutual labels:  osu
osuElements
A .NET framework for osu! (osu.ppy.sh) applications
Stars: ✭ 33 (+106.25%)
Mutual labels:  osu
Osu Performance
Calculates user performance aggregates from scores
Stars: ✭ 186 (+1062.5%)
Mutual labels:  osu
kyo-rs
The next generation of kyo, a fully featured and modern osu! server switcher
Stars: ✭ 14 (-12.5%)
Mutual labels:  osu
Sync
Sync your Live Channel's Danmaku or Comment to osu! IRC
Stars: ✭ 139 (+768.75%)
Mutual labels:  osu
rurusetto
A wiki that contain all osu! rulesets
Stars: ✭ 31 (+93.75%)
Mutual labels:  osu
Osu Player
A multifunctional media player for osu and osuer. Modern interface with WPF.
Stars: ✭ 123 (+668.75%)
Mutual labels:  osu
osu-deploy
Deploy script for lazer
Stars: ✭ 39 (+143.75%)
Mutual labels:  osu

NuGet

OppaiSharp

OppaiSharp is a C# port of oppai-ng by Francesco149, based on its Java port Koohii. It allows you to calculate star ratings and PP values for any osu!standard map, just like oppai(-ng) does.

It is "licensed" under the Unlicense, so you're free to do whatever you want with it. But giving me or Francesco149 a bit of credit doesn't hurt, and I would appreciate it if you didn't claim it as your own :)

Warning

This repo is not up-to-date with the latest changes to the PP and SR algorithm, and has been superseded by the official implementation at ppy/osu. Please switch to using it.

Example usage

v2:

//create a StreamReader for your beatmap
byte[] data = new WebClient().DownloadData("https://osu.ppy.sh/osu/774965");
var stream = new MemoryStream(data, false);
var reader = new StreamReader(stream);

//read a beatmap
var beatmap = Beatmap.Read(reader);

//calculate star ratings for HDDT
Mods mods = Mods.Hidden | Mods.DoubleTime;
var diff = new DiffCalc().Calc(beatmap, mods);
Console.WriteLine(string.Format("Star rating: {0:F2} (aim stars: {1:F2}, speed stars: {2:F2})", 
    diff.Total, diff.Aim, diff.Speed));

//calculate the PP for a play on this map
//the play has no misses or 50's, so we don't specify them
var pp = new PPv2(new PPv2Parameters(beatmap, diff, c100: 8, mods: mods));

Console.WriteLine(string.Format("Play is worth {0:F2}pp ({1:F2} aim pp, {2:F2} acc pp, {3:F2} speed pp) " +
                                "and has an accuracy of {4:F2}%", 
    pp.Total, pp.Aim, pp.Acc, pp.Speed, pp.ComputedAccuracy.Value() * 100));

v1 (old):

//create a StreamReader for your beatmap
byte[] data = new WebClient().DownloadData("https://osu.ppy.sh/osu/774965");
var stream = new MemoryStream(data, false);
var reader = new StreamReader(stream);

//parse the beatmap
var beatmap = new Parser().Map(reader);

//calculate star ratings for HDDT
Mods mods = Mods.Hidden | Mods.DoubleTime;
var stars = new DiffCalc().Calc(beatmap, mods);
Console.WriteLine(string.Format("Star rating: {0:F2} (aim stars: {1:F2}, speed stars: {2:F2})", 
    stars.Total, stars.Aim, stars.Speed));

//calculate the PP value for a play
var pp = new PPv2(new PPv2Parameters {
    Beatmap = beatmap,
    AimStars = stars.Aim,
    SpeedStars = stars.Speed,
    Mods = mods,
    Count100 = 8,
    Count50 = 0,
    CountMiss = 0,
});
Console.WriteLine(string.Format("Play is worth {0:F2}pp ({1:F2} aim pp, {2:F2} acc pp, {3:F2} speed pp) " +
                                "and has an accuracy of {4:F2}%", 
    pp.Total, pp.Aim, pp.Acc, pp.Speed, pp.ComputedAccuracy.Value() * 100));
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].