forum

osu!sdk (client SDK)

posted
Total Posts
57
show more
Topic Starter
peppy
Added a new method to get arbitrary slider (ball) position. After a short discussion about people working on their own star rating systems, I checked the SDK and this was basically the only thing missing to allow for most calculations.
Kert
I got a strange error:
Ошибка	3	"osu.GameModes.Edit.AiMod.AiModType" не содержит определение для "Errors"	e:\prg\peppy-osu-sdk-5be32ec\AiModTestProject\AiModTest.cs	17	36	AiModTestProject
Meaning there is no definition for "Errors"
VS2012

UPD: Used Meta as a workaround instead of Errors which doesn't exist.
Topic Starter
peppy
Fixed this, thanks. Let me know how you go with it, and if you need anything else added.
Kert
Thanks!
While fiddling around with it I just realised.. are there no methods for returning beatmap difficulty settings?
Can they be added too? This information is quite important for star difficulty calculation
Topic Starter
peppy
They can, yes.

Author: Dean Herbert <pe@ppy.sh>#mailto:pe@ppy.sh
Date: 28 seconds ago (Wed May 08 04:41:27 2013)
Commit hash: 323e250acce7d7726d90ddc3cc8887bfa98a912d

Added OsuHelper static class used to talk directly to osu! outside of provided AiMod endpoints. Initially allows retrieval of the active Beatmap.

BeatmapBase b = OsuHelper.GetCurrentBeatmap();
Console.WriteLine("AR: {0} CS: {1} HP: {2} OD: {3}",
b.DifficultyApproachRate,
b.DifficultyCircleSize,
b.DifficultyHpDrainRate,
b.DifficultyOverall);
Kert
I guess these should be added to AiModTest.cs
using osu.GameplayElements.Beatmaps;
using osu.Interfacing;

But even after adding them osu! tells that there was some internal error and AIMod isn't even opened
I only have one line of code that does something with new class
BeatmapBase b =  OsuHelper.GetCurrentBeatmap();
If I comment it out AIMod opens normally

Btw, so far I've made code for calculating difficulty of cursor movement and it tells quite nice and true numbers I should say
I am not sure how I'll scan all maps to check how it works after the system is completed though
Marcin
Well, I'm going to make on my summer break, based on Arduino micro-controller LED lights, which I want to pulse in rhythm of osu!. What I'll need basically is:
- An API, with event, which would be called everytime, the player starts / stops map (Which would return "BeatmapInformation" class with BPM, Length, Timing points (with inherited timing points, for getting sampleset [soft / normal]?)
- Getting current time of mp3 (while playing, so I'll be able to sync up my lights, with osu! rhythm).
- Events about hitsounds - Clap, Whistle, Normal, and Finish - called everytime, when player hits those. (Additionally, information if it was circle, slider [at which case, would provide if it's slider start / end], and spinner [with length information])

Is there a way, that osu!sdk could provide it (everything up there, would be used for actual Gameplay)?
MillhioreF

Marcin wrote:

Well, I'm going to make on my summer break, based on Arduino micro-controller LED lights, which I want to pulse in rhythm of osu!. What I'll need basically is:
- An API, with event, which would be called everytime, the player starts / stops map (Which would return "BeatmapInformation" class with BPM, Length, Timing points (with inherited timing points, for getting sampleset [soft / normal]?) This would be very nice for speed calculations. At least a way to get the base BPM and the BPM modified with slider velocity would be nice.
- Getting current time of mp3 (while playing, so I'll be able to sync up my lights, with osu! rhythm). Umm, why would this be needed? Use the current time of the hitobjects, or do it like Nightcore and follow the BPM (gotten with the point above)
- Events about hitsounds - Clap, Whistle, Normal, and Finish - called everytime, when player hits those. (Additionally, information if it was circle, slider [at which case, would provide if it's slider start / end], and spinner [with length information]) You can already get the hitsounds with the current API, as well as check for sliders and spinners.

Is there a way, that osu!sdk could provide it (everything up there, would be used for actual Gameplay)?
Just about everything you've requested is already there, it sounds like you just want to access it during gameplay. Doesn't seem too unreasonable.
Topic Starter
peppy
@Kert: will look into it.
@Marcin: i'm not yet sure about play-time access. focussing on aimod only for now. in the mean time, you could probably base lighting on polling screen colours and sound levels (i've done this before and it works great).
Marcin
Millhioref, last point, is about play-time access, like events raised, WHILE PLAYING. That means for ex.:
I register an event with code:
osuClass.PlayerEvent += new PlayerHit(myFunctiontoDealwithIt);

Then my function, called "myFunctionDealwithIt" is called, EVERYTIME, when player hits some object, for ex.

private void myFunctionDealwithIt(PlayerHit ph)
{
//Some calls to my own Arduino-based API, creating fancy lights

}
Where PlayerHit has some properties like:
ph.ObjectType
{
Circle
SliderStart
SliderEnd
Spinner
}
ph.CurrentTime (which returns current playtime)
ph.HitSound
{
Normal
Clap
Whistle
Finish
}
ph.nextExists (returning true / false depending if there is next object, after currently called).
Topic Starter
peppy
All of which is already there, except for the current time. Which is what Millhiore was saying.
Primula_old
As you mentioned here, I would like to request exposure of methods to safely access data from the osu!/scores/collection database files.

---
Things which are probably unlikely below~

It may also be nice to have access to data related to:
  • The current map playing on the menu.
    The currently selected map on the map listing.
    The current map being played.
And a method to manipulate which map is playing on the menu and the ability to read the current position & length of the song. (To limit playing songs to ones of which found in specified collections)
Kuudere
This looks fun ^.^

Now I just need some Ideas for projects...
Limyc
It would be helpful to have access to the following slider data so that I can calculate the positions and angles I need:
  1. The total length of the slider curve from Position to EndPosition (distance, not time).
    1. Currently doable, but it would have to be calculated manually for each slider by using PositionAtTime.
  2. The radius of the slider ball.
    1. Maybe I can calculate this using BeatmapBase.DifficultyCircleSize somehow?
Also, I noticed that AiReportTwoObject adds a line that connects the two related hitObjects. I would love to have that same capability in custom report classes. Being able to draw lines and curves would make it easier for the user to understand where the potential problem lies and how it might be fixed.
Dest Matter
PositionAtTime isn't actually implemented yet, all it does is return the starting position, so sadly getting the slider length isn't really doable.
grumd

Dest Matter wrote:

PositionAtTime isn't actually implemented yet, all it does is return the starting position, so sadly getting the slider length isn't really doable.
This got fixed, I guess? https://github.com/peppy/osu-sdk/issues/17
Max
Is this still being updated?
Kyozoru
So this usually decreases the lags or something?
and uhm how do i set this up? help pls
GhostSkull
First of all things hi :)

Is there a way to add the possibility to read replay files. Just like the game does, but that the read stream can be loaded into a code wich
converts it in a video. (with the skin and the sounds of the skin + the music)

I know this reply is a bit short handed, it is because i don't want to write all that text i wrote again. If i would know were the draft is i would use my text i wrote originaly. And on the other hand i don't even know if it is possible that easy.

The main point for me asking this is, that there are people with pc that can't play the game and record at the same time without having fps drops and
for those such a feature would be nice.

Is that a possible feature?
Techxpert
Is it possible to make for example an app with this sdk? e.g Osu! for windows phone?
MakeMeUnseeIt
GitHub page shows 404. Is it still relevant?
Merami Fox

palion wrote:

good to see this :)



peppy wrote:

Krzysiek wrote:

Stuff I'd like to see regarding SDK


None of this falls under the scope of this SDK.




Cozmo?
xskylar
RIP osu!SDK
Please sign in to reply.

New reply