forum

osu!sdk (client SDK)

posted
Total Posts
57
show more
Sushi
Ohmy didn't see that, going to try it out tonight :D

I guess it's already in the scope but will there be something like a new tab in the menu bar like "add-ons" where we could add commands?
Eirene
ohgod... not gonna sleep until Ive done something cool with this ._.
YodaSnipe
So what exactly are we limited to with this SDK? Are there any specific rules to using this?
Topic Starter
peppy
At the moment you can implement AiMod modules, so it's editor-only for now. You can request more functionality/exposed APIs by filing issues on github. May I suggest that you start with AiMod just to get a feel for how things will work, and because it is a nice contained environment, before requesting more advanced stuff.
Yuugo
Man I wanna look into this, but I don't even know what I want to implement.. guess I'm just gonna start by reading through your code then and translate my java knowledge into C# syntax. Thanks for the opportunity peppy!
woc2006
No one care github issues anymore?
Topic Starter
peppy
I don't think you understand the art of waiting. I will get to it when I have the time.
Krzysiek
Didn't you mean le art of waiting?
Yuugo
So let me try to get this clear. Right now you are giving us access to a limited amount of code and let us play around with the AiMod. When we feel like we have a nice idea and are able to implement this through proper coding we can request more access where necessary? I'm not entirely sure what out possibilities are with this SDK. Could you clarify a little on this peppy?
Topic Starter
peppy
Yes, at the moment it lets you have access to beatmap content via AiMod. It is intended to eventually allow AIBat (amongst other potential projects) to enhance the editing and modding process.

At the moment the possibilities are:
* Reporting new information about a beatmap via AiMod.
* Editing basic elements of HitObjects.
emergist
Awesome! It makes me want to learn C#.
Marcin
Maybe you can make a list of function, which we can use ? (I don't have supporter so I don't know how it works.)
Topic Starter
peppy
You can view the source on github. You don't need supporter status to view it.
Marcin
BTW: Could you make writing addons in more friendly-user language (Lua, python, perl?), i've never started learning c++/c# because of it being really complicated. (or maybe I should learn, and make addon to sdk which would allow making addons in other languages... addonception)
Topic Starter
peppy
I do not see the need for a different language for this. c# is not much more complicated (if at all) than any of the languages you list, and allows for the tightest integration.
Marcin
Am I wrong or something?
Second is used at GMod (aka GLua language - edited Lua), now see how much they made with usage of this language which is in your opinion, less functionally
(There is even CPU in game)
Topic Starter
peppy
You are calling brackets and extra commenting more complicated? I never said "less functional".

Please do not start a language war in this thread; the osu!sdk will only be made available in c#.
Marcin

peppy wrote:

You are calling brackets and extra commenting more complicated? I never said "less functional".

Please do not start a language war in this thread; the osu!sdk will only be made available in c#.

I meant some senseless (for me not knowing this language) things like public override AiModType Type or protected override void RunAllRules(List<HitObjectBase> hitObjects) or even namespace AiModTestProject
Topic Starter
peppy
namespace keeps things organised.
the override is setting the type of your module.
the runallrules definition is providing you with every hitobject in the song (with r/w access).
i'm pretty sure putting a few hours into learning the language would teach you these things, though.
Marcin

peppy wrote:

namespace keeps things organised.
the override is setting the type of your module.
the runallrules definition is providing you with every hitobject in the song (with r/w access).
i'm pretty sure putting a few hours into learning the language would teach you these things, though.
Then, find me some books/ e-books with GOOD explained things, (not just mentioned, like almost 70 % of internet tutorials)
Btw: i meant those prefixes like protected, etc. not the functions names.
Topic Starter
peppy
As much as I'd like to, I'm not here to educate you, sorry. Maybe start a thread in General Discussion asking for help if you are interesting in learning a language. (personally i have never read a book and just learn from doing, so can't help here)
awp
if you're using the Visual Studio IDE to write stuff, some of their error code explanations provide some insight. Otherwise, scour stackexchange, it's a pretty good site for finding help
deathsign
It's really good to see this!
I'm implementing a OSU! on Windows Phone 7 using original resource package . I have finished main game logic.
But I have some problem with the storyboard....
Maybe you can write a document for the .OSU file format...
Soaprman


Might try some other stuff with this. Don't have any really good ideas though...
Marcin
Yey don't hate me but c# was pretty easy... /me runs FAR FAR FAR FAR away
And one thing bother me: it's limited only to AiMod, why don't you add functions for:
- Custom menus in editor mode <i mean those line with File, Edit, View etc., to be able to add one>
- Generating SB script <functions for adding SB _F, _S etc.>
- Adding custom panels <like osu!direct panel which appear on right>
Topic Starter
peppy
Custom editor modes may be supported.
Generating SB script can be added.
Custom panels will not be supported.

If you are looking for specific API additions, please file issues on github with examples of how they will be used.
Marcin

peppy wrote:

Custom editor modes may be supported.
Generating SB script can be added.
Custom panels will not be supported.

If you are looking for specific API additions, please file issues on github with examples of how they will be used.
Done, Issued on github.
RixTox
Why don't we just make OSU! an open source project?
GNU is always the best!~ 8-)
Even it's under Windows OS..
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