-
Notifications
You must be signed in to change notification settings - Fork 559
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
Add glitchless mode #1196
base: master
Are you sure you want to change the base?
Add glitchless mode #1196
Conversation
The code quality has been improved in several ways: - Variables are `const`-qualified where possible. - Storing pointers to the objects referenced so `entities` doesn't need to keep being indexed, and the objects can then be referred to with better, longer names like `person` and `line`. - Early returns are used so the most important code doesn't keep being pushed to the right. - The comment from `entityclass::collisioncheck` is moved here, because it should be in this function and not at the callsite of the function. The existing comment in the function is made redundant with the more descriptive variable names, and is removed. - The comment has also been improved to be more concise and clear.
This brings these functions into conforming code style and is a small performance optimization.
This removes unnecessary indentation in the code responsible for acting on a horizontal gravity line collision. The "meat" of the code is now no longer pushed to the right, as it should be.
This only adds glitchless mode as a menu option in the speedrunner options menu, and saving and loading it as a settings boolean. It is not yet functional. Glitchless mode and glitchrunner mode are mutually incompatible.
This disables pressing R to instantly die on the spot in glitchless mode. However, it is still available in custom levels. The R key was intended to get players out of softlocks in custom levels, but it was left enabled in the main game by mistake. This turned out to enable a variety of various glitches, most notably telejumping. So it was left enabled. But now glitchless mode disables it, to prevent pressing it by accident for speedrunning goals that prohibit pressing R.
The warp token death warp glitch is simple. It takes advantage of the fact that, in the main game, warp tokens (barring some exceptions) only change the room but do not change the player's position. So if the player dies while touching a warp token, the room will change but they will stay at the same position of their respawn point, which is used in speedrunning. To fix this, if the player dies, make sure that the warp tokens in the room don't warp them. Otherwise, this would still be possible to do even without pressing R.
The reason that line clipping works is because when the gravity line unflips the player, they are still eligible to flip (with onground/onroof) so by doing it frame-perfectly they can flip again. To fix this, just zero out their onground/onroof. This glitch mainly applies to horizontal gravity lines but it is also possible, but less severe (in most cases), with vertical gravity lines, so this fixes it for vertical lines too.
TODO: use color_valid for other commands?
Are you going to fix the issue of getting stuck in walls (on custom levels, travelling into the next room will get you stuck in the wall if your entrance to the next room is blocked.) |
That's not really what glitchless mode was intended to solve - wall sliding is more of a failsafe, and not a glitch. |
A real "failsafe" would be simply not letting the player enter the room. (e.g detecting if the tile in the next room is wall) |
Unless the official VVVVVV levelset has used this failsafe, ofc. |
Glitchless mode is intended for speedrunners, as the PR description states. It should not have anything to do with custom levels. Additionally, your "real failsafe" would break levels which already uses this mechanic, which matters even if it's not a built-in level. |
This adds a new mode (mutually incompatible with glitchrunner mode) that disables glitches that would otherwise be used in speedrunning. The intention is to facilitate speedrunning glitchless categories without accidentally triggering a glitch which would invalidate the run (e.g. line clipping).
Legal Stuff:
By submitting this pull request, I confirm that...
CONTRIBUTORS
file and the "GitHub Friends"section of the credits for all of said releases, but will NOT be compensated
for these changes unless there is a prior written agreement