Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement OsuModDepth #25653

Merged
merged 12 commits into from
Dec 25, 2023
Merged

Implement OsuModDepth #25653

merged 12 commits into from
Dec 25, 2023

Conversation

EVAST9919
Copy link
Contributor

2023-12-03.05-01-16.mp4

@peppy
Copy link
Member

peppy commented Dec 3, 2023

I feel like it would work better if the objects kept scaling beyond the hittable time, or if that doesn't play well, should be a bit more easing as they arrive at the final location at least.

@EVAST9919
Copy link
Contributor Author

EVAST9919 commented Dec 3, 2023

if the objects kept scaling beyond the hittable time

Looks cool, but sliders becoming a problem

sliders.mp4

And this is version with easing:

easings.mp4

However 3d effect isn't as pronounced anymore
May be easing as a setting will be a good alternative?

@peppy
Copy link
Member

peppy commented Dec 4, 2023

Can you try the first but reduce the amount of zoom as it gets closer to 1x? I think it's cool to have to follow the sliders while zooming personally, and if limited a bit more in scale it should still be playable?

@EVAST9919
Copy link
Contributor Author

EVAST9919 commented Dec 4, 2023

Can you try the first but reduce the amount of zoom as it gets closer to 1x? I think it's cool to have to follow the sliders while zooming personally, and if limited a bit more in scale it should still be playable?

Hmm. But what about if there's a very long slider which takes more than few seconds to complete? Should it have a different zoom speed or may be speed of all the objects should be adjusted depending on the longest slider duration?
Also in this case auto will be broken while sliders are moving so is its follow circle

@peppy
Copy link
Member

peppy commented Dec 4, 2023

Are you able to change long sliders to zoom slower than the "normal" speed, where normal speed is applied to basically every other object?

@EVAST9919
Copy link
Contributor Author

Here's what I have right now
https://streamable.com/tglykj

@peppy
Copy link
Member

peppy commented Dec 4, 2023

Looks better

@peppy peppy self-requested a review December 5, 2023 07:18

float z;

if (time < hitObject.StartTime - decelerationTime)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dunno, this feels worse to me than not having it at all.

diff --git a/osu.Game.Rulesets.Osu/Mods/OsuModDepth.cs b/osu.Game.Rulesets.Osu/Mods/OsuModDepth.cs
index 18d4fef5e8..16517a2f36 100644
--- a/osu.Game.Rulesets.Osu/Mods/OsuModDepth.cs
+++ b/osu.Game.Rulesets.Osu/Mods/OsuModDepth.cs
@@ -103,13 +103,7 @@ private void processObject(double time, DrawableOsuHitObject drawable, double du
 
             float z;
 
-            if (time < hitObject.StartTime - decelerationTime)
-            {
-                double appearTime = hitObject.StartTime - hitObject.TimePreempt;
-                float fullDistance = decelerationDistance + (float)(baseSpeed * (hitObject.TimePreempt - decelerationTime));
-                z = fullDistance - (float)((Math.Max(time, appearTime) - appearTime) * baseSpeed);
-            }
-            else if (time < hitObject.StartTime)
+            if (time < hitObject.StartTime)
             {
                 double timeOffset = time - (hitObject.StartTime - decelerationTime);
                 double deceleration = (slowSpeed - baseSpeed) / decelerationTime;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally I prefer my version more, but may be I'm just biased

double deceleration = (slowSpeed - baseSpeed) / decelerationTime;
z = decelerationDistance - (float)(baseSpeed * timeOffset + deceleration * timeOffset * timeOffset * 0.5);
}
else
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My proposal was to only slow objects down when actually required (even if applied to all sliders to start with). I think not applying this whenever we can avoid doing so will make the visuals of this mod much better.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah okay, we are on the same page then

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even better would be only applying when a slider gets "too long" (maybe too long for autoplay to hit it correctly with no autoplay path adjustment?)

Copy link
Contributor Author

@EVAST9919 EVAST9919 Dec 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I've made some changes. Now every object moves at a constant speed, except for long sliders. There's a check for how big it would become at the end time if allowed to move at a constant speed. If its scale will be bigger than 1.5 deceleration will be applied.
Generally works fine for autoplay due to followcircle being big enough for cursor to follow.

@peppy peppy self-requested a review December 6, 2023 07:09
@peppy
Copy link
Member

peppy commented Dec 6, 2023

Looking very nice now, but looks like you'll need some special handling for stacking:

CleanShot.2023-12-06.at.07.15.05.mp4

public class OsuModDepth : ModWithVisibilityAdjustment, IUpdatableByPlayfield, IApplicableToDrawableRuleset<OsuHitObject>
{
public override string Name => "Depth";
public override string Acronym => "DH";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe DP is better?

@peppy peppy merged commit 4fc1691 into ppy:master Dec 25, 2023
@EVAST9919 EVAST9919 deleted the depth-mod branch December 25, 2023 12:41
@iminlikewithyou
Copy link
Contributor

is there a specific reason you can't use Hidden with this mod? i use hidden all the time and it seems like it would be fun with Hidden

@EVAST9919
Copy link
Contributor Author

is there a specific reason you can't use Hidden with this mod? i use hidden all the time and it seems like it would be fun with Hidden

"Hide approach circles" setting is conflicting with the hidden mod since it always has them hidden.
And even ignoring that - objects are constantly moving, so with HD enabled it would be way harder to predict their placement at the hit time.

@huyenden
Copy link

I wish Depth could combine with Transform, Grow and Traceable. But if the commands conflict with each other, ignore my suggestion.

@huyenden
Copy link

bandicam.2023-12-29.06-13-19-392_3.mp4

I just want to praise the first half of this clip because it's beautiful.

Regarding the second half of the clip, when the sliders become longer and longer (like rockets), the visual position to aim also changes. I guess this is difficult to fix, so let's ignore it, because cs4 is still under control.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants