-
Notifications
You must be signed in to change notification settings - Fork 34
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
"Snapbacks" #256
Comments
Surprised nobody brought this one up earlier. The same thing happens with ceilings too. Try to fix it every so often but keeps happening. Per pixel checking was one of the ideas (so if the player moves 0x600 units, 3 pixels, collision will be checked 3 times). It's what the real Cave Story does, but I'm afraid it could slow things down. Another is checking floor/ceiling vs walls first if the player is moving up/down faster than they are moving left/right. That's something I do with platforms (imagine a platform moving up and quote falling into it. In that situation floor collision needs to be checked before walls or else quote will get pushed to the side). Limiting the maximum amount of "pushback" could also mitigate it, instead of pushing quote out of the wall entirely in one go. Quote's speed is never (or at least rarely) faster than 3 pixels per frame. And this one I came up with just now. Rewrite the level collision just for the player to check all directions but hold off on adjusting the player's speed and position, then compare how "in" the walls/floor each side of the player is, and take the path of least resistance. I'll stop rambling now. |
Looks like that might be tedious to do, but I'll leave you to it. You can do this! |
Not completely fixed but mitigated it to a point. At first I tried rewriting the player collision but it wasn't working out, so I just made it so when this happens you will never be pushed more than 3 pixels. This is good enough for me. Maybe someday I'll come back to it again. |
The booster ceiling thing should be fixed though. I forgot that the collision on the booster was separate. |
BTW this also happens on the presses in Hell, it makes it a lot harder do get the hearts above them. |
*TO get the hearts above them. |
That does happen but the code that causes it is different (object vs object collision). I mitigated it with platforms but for some reason it still happens with presses in particular |
This is the second issue I ran into while doing that screenshared run.
This seems to happen randomly, and at any place in the game.
As it turns out, the GIF that shows this is larger than 10 MB. I'll email it to you.
Note how Quote snaps to the right.
The text was updated successfully, but these errors were encountered: