-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Fixing Autopilot by calculating between the lastJudgedObject and currentJudgedObject #33483
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
base: master
Are you sure you want to change the base?
Conversation
Ok, let me explain these changes. frac is changed to progress since it seems more intuitive. Since progress is clamped we dont need to check distance fractions. Removed hitwindow_end_offset because I think it doesn't really add much at all. I moved hitwindow_start_offset around to better show it as a transition point of some sort. Again intuition. More comments were added to better explain what was going on and why each piece was there. Also timeLeft was originally being calculated wrong. If we were hitwindow_start_offset plus 1 ms away from the target, we would take 1 ms to travel to that target. What was expected was hitwindow_start_offset plus that 1 ms.
Ok, here's the current rundown as of currently.ON INITIALIZATION
DURING GAMEPLAY (CURSOR MOVEMENT)
DURING REPLAY
ISSUES FOUND
OTHER FEATURES THAT COULD BE ADDED QUICKLY
CONCLUSIONBasically to make cursor reach the start of the hitwindow, the implementation compromises in visual cues, while trying it's best to retain it. The implementation aims to give the player as much room to give judgement on tap. And personal note, currently ready for review. |
I decided to make a different pull request and close down the other pull request down since it seems fairly different, but this pull request is a bit more evolved. The new code remembers where and when you last made a hitobject judgement, then it calculates the percentage of time passed between the last hit object judgement to the next hitobject hitwindow. It applies that percentage to the distance between where the cursor was at the last hit object judgement to the position of the next hit object.
I want to do some heavy simplification on the code and some changes since it's almost 300 lines of code, but I'm again stuck so I decided to post a pull request to show that it works, but may need some changes due to performance issues and the size of the file.
Also personal note, coding this and in general, is really fun.
Here's a video below demonstrating the edited mod
2025-06-10.17-03-13.mp4