forum

What are some technical details of osu! gameplay?

posted
Total Posts
8
Topic Starter
maboesanman
I'm writing a replay viewer/analyzer program, and part of that requires me to make an exact replica of osu!'s game engine.

what I'm wondering about here are some implementation details for sliders and spinners, and also how HP is determined.

Sliders:

- what exactly happens when slider ball reaches slider tick? (i believe it checks if the cursor is within 2 x (circle radius) of the slider tick. if not, drop combo. If so, +1 combo, add points(?) and remove slidertick sprite.

- what happens at a slider end? same thing but no drop combo?

- how exactly is it decided what score you will get for a slider between 50 and 100? is it how many of the slider ticks/ends you hit?

- are repeat slider ends (with arrows) treated as a regular slider tick or a slider end?

Spinners:

- how long do you have to spin for?

- how many rotations do you need as a function of spinner length, and maybe OD?

HP:

- how fast does HP decrease (as a function of HP drain rate)?

- how much HP do you get for a 300? a 100? a 50(as a function of OD/HP)?

- is it the same for sliders and hitcircles?

- do you get HP for slider ticks?

- what happens to HP during spinners?

if you have the answer to any of these, it will be helpful!

Thanks!!! I look forward to posting the first working version here on reddit for people to mess around with.

if you're interested in looking into the project, there's code here: https://github.com/maboesanman/osu-spectate
Mahogany
Sliders

-If the cursor is within the followcircle when the sliderball hits a slidertick, you get +1 combo and a small amount of health and points. I also believe the points are unaffected by the current combo multiplier.

-Sliderends I'm not sure what you're asking here, but you can miss them without losing combo: you just get a 100.

-It's based on how long you were outside of the followcircle. So kind of, yeah.

-Repeat slider ends would be treated more like a tick: If you miss them, you break combo, compared to ends, which you can miss at a much lesser penalty

Spinners

-That varies wildly. It's based on spinner length, overall difficulty, and whether you have any time-altering mods on.

-Me no comprendo maths

HP

-I can't help you with maths or functions or whatever that is :w:

-You do get HP from sliderticks.

-You regenerate more HP if you spin faster on spinners. Your health continues to drain during the spinner.

Best of luck with your project!
Saphirshroom
This might help you:
https://osu.ppy.sh/forum/t/221726

If you want to do it yourself, your best bet is just PMing someone with the source code or looking it up in the Wiki, although I doubt it has information that detailed.

edit: Wouldn't it be much easier just reading osu's process memory while it's running? That's pretty much what you're trying to do by spectating, after all.
Topic Starter
maboesanman
Reading osu's process memory would not help at all, because, while the code is in memory, it's effectively obfuscated by .net. Also, I don't know how to do that already, so it would take a while to learn, so probably not be worth it.

And I don't wanna get flagged as cheating software lol.
Saphirshroom
I haven't exposed myself to the pain of C# programming yet, but iirc after you've executed the .exe for the first time it gets compiled by the JIT compiler and then stored in the .exe file, so I assume reading code "properly" and without much effort is only possible if you have a C# decompiler/disassembler. What I meant is reading memory that is useful to you - like how much health the player currently has, or were the hitcircles are and when they disappear. Basing your whole application on reading osu's memory will be much easier than trying to reverse engineer it and it would probably pay off learning how to do that.
Coincidentally (or rather, because I asked), I know that this guy uses the same technique - reading the hitcircle's locations - to calculate and control the cursor movements live. I'm sure he'll give you a few pointers on how to read from osu's memory if you ask him nicely.

Replicating the game engine will be impossible unless you either have the source code/information or reverse engineer osu.

Whether you'll get flagged or not is an entirely different question, you should probably ask peppy if you have doubts.
shortpotato
skill = pp

/runs
nrl

Saphirshroom wrote:

What I meant is reading memory that is useful to you - like how much health the player currently has, or were the hitcircles are and when they disappear. Basing your whole application on reading osu's memory will be much easier than trying to reverse engineer it and it would probably pay off learning how to do that.
What you're suggesting is completely impossible in practice. An external process wouldn't even be able to locate osu!'s memory, let alone defragment and read it, and even if it could, no human would be able to discern which bits are meaningful and which are pure overhead. The guy you've referenced is almost certainly reading the beatmap file to obtain the hitcircle locations.

Also, C# is about the friendliest compiled language out there.
Saphirshroom

Narrill wrote:

Saphirshroom wrote:

What I meant is reading memory that is useful to you - like how much health the player currently has, or were the hitcircles are and when they disappear. Basing your whole application on reading osu's memory will be much easier than trying to reverse engineer it and it would probably pay off learning how to do that.
What you're suggesting is completely impossible in practice. An external process wouldn't even be able to locate osu!'s memory, let alone defragment and read it, and even if it could, no human would be able to discern which bits are meaningful and which are pure overhead. The guy you've referenced is almost certainly reading the beatmap file to obtain the hitcircle locations.

That was my initial guess too.
It's far from impossible though. If you just want to view memory, you can type "gcore pid" under Linux to create a core dump of a process while it's running and then use gdb or something similar to play around with it. There are also multiple open-source memory editors available, like this one that rely on knowing the value of a variable at a given time and, within multiple iterations, determine the exact address of the desired variable. As such you'd probably have to manually guess for a bit to find the addresses for things like the health variable but I'm sure it's not impossible - after all you know that after every hitcircle you miss it goes down quite a bit and after every circle you hit, it goes up (and at the start of the song it's filling up slowly, that might just be a graphical thing though).
It's quite cumbersome, of course, but I still think it's easier than replicating the game engine from scratch unless he gets support from staff.
Please sign in to reply.

New reply