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

Improve behavior of slider follow circle with lazer's new tail leniency #27382

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

Detze
Copy link
Contributor

@Detze Detze commented Feb 25, 2024

Namely:

  • ensure the slider end animation plays when a slider changes tracking state in the tail leniency region,
  • play the slider tail break animation at the slider end, not at the slider tail leniency point,
  • re-think the slider tail break animation, coming from stable where it (unintuitively) plays, and thus leaves the playfield, much earlier.

Now supercedes #27352. It might be useful to read its thread and the comments in the linked issues for motivation behind the changes.

Visual comparisons and summary of all changes below.

Resolves #25981, resolves #22150, resolves #26000, resolves #22228.


Depends on #27352. Developed with the goal of eventually resolving #22150, although it actually makes the fade-out time even worse, but this is the logical behavior and a solution should be applied elsewhere.

Making the slider break animation play at the slider end, not at the slider tail leniency point, is the more intuitive behavior in lazer because of the new tail leniency, where the player can have activated the slider at any point in the [0, 36] ms range before the slider end time, instead of at exactly 36 ms. The existing comment claims that stable plays the break animation when the slider tail is missed, but that is not true, it's played 100 ms before that, and finishes at the slider tail.

In lazer, the Break animation is the animation played after missing a slider tail. This is the logical and expected lazer behavior, but not the expected stable behavior (in stable, it is the End animation), and clutters the screen with a follow circle fade for over 100 ms longer than stable. In the future, it should be discussed which slider end animation solution is best, as said in the issue.

@Detze
Copy link
Contributor Author

Detze commented Feb 26, 2024

Actually, I propose a solution to #22150 - on a slider tail break, simply don't play any animation. This is clear, because if a player does hit the slider tail, then the End animation will play. This also matches stable, because if a player does not have activated the slider at the tail tick, then the animation will have finished playing at the slider tick time, as it started 100 ms before that, which means there is no follow circle after slider end time.

The only minor problem with this is that after some other animations, such as Tick, the follow circle might stay in a visible state forever (for Legacy Tick, 2x Scale and 100% Alpha), so TailBreak needs to not only play nothing, but also instantly remove the follow circle. But after trying it out, I think it still works well, and is a far better solution than anything else I can think of. There's simply no way to achieve all three of no screen clutter, no illogical early start, and no instant change on tail break, and I think the third is by far the least bad.

@peppy
Copy link
Sponsor Member

peppy commented Feb 26, 2024

Gifs or video please. 4 paragraphs of text for a visual change isn't great for parsing.

@Detze Detze marked this pull request as draft February 26, 2024 19:47
@Detze Detze changed the title Make slider break animation play at the slider end, not at the slider tail leniency point Improve behavior of slider follow circle with lazer's new tail leniency Feb 26, 2024
@pull-request-size pull-request-size bot added size/L and removed size/M labels Feb 29, 2024
@Detze Detze marked this pull request as ready for review February 29, 2024 10:02
@Detze
Copy link
Contributor Author

Detze commented Feb 29, 2024

The idea of this PR in a nutshell: if even once in the tail leniency timespan the slider was activated, play (OnSlider)End at that time, else play TailBreak at slider end time. There are no changes to follow circle behavior outside of the tail leniency region compared to live lazer. This means there's only a few scenarios to check here:

  • tail is tracked at its start time:
    On both stable and lazer, this results in an End animation at tail's end time. In the PR, End animation is played right away at tail's start time (the slider is already completed thanks to tail leniency, so this makes sense). So the only difference is that it plays 36 ms earlier. Unremarkably, the animation works without issues if the slider remains tracked to the end. If the cursor leaves the slider early, this also works without issues (in the code, in the tail leniency region, only entering the slider can change the animation):
new-TU.mp4
  • tail is not tracked at its start time:

Refer to the footage in #22150 while reading this paragraph. Stable plays the Break animation at -136 [ms after slider end time], and lazer plays it at -36. In the PR, existing animations are played, and TailBreak (which is defined as just an instant fade-out) is queued to play at tail's end time (so basically, there's no new animations since the previous one; this makes sense: no new animations can be played before the end of the slider, as the player could always reactivate until then, and no new animations can be played after because it would reduce the visibility of the next objects). If the slider remains untracked to the end, stable/lazer's Break animation will end 100 ms later at -36/64, whereas in the PR, TailBreak plays at 0, removing the follow circle:

new-UU.mp4

While not the most exciting, playing nothing on TailBreak works well, as missing the slider tail results in a miss, and thus (assuming the slider head wasn't also missed) informs whether the tail was hit or not (in the slider head miss case, there's also another tell - the lack of the End animation). I don't see a need for a special follow circle animation here, and as I said above, the alternatives of illogical early starts and cluttering the screen are far worse.

Re-entering the slider during the tail leniency timespan is the most impactful case. Currently in lazer, transforms step on each other's toes in this scenario: #25981 (Press before End kills the animation), #26000 'Sliderfollow dissappear on miss' (Break before End, animation is long and distracting), #22228 (Break into Press into End, the fade-out is excessively lengthened). In the PR, the End animation is played at the time of hit:

new-UT.mp4
  • changing tracking state multiple times in a tail leniency region can also be reasoned to be without issues, as it can only do anything when re-entering, and that merely redoes the End animation (the redoing of End could be removed, but it would be a microscopic difference for the cost of more code).

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