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

Addresses two common collision issues #2584

Merged
merged 1 commit into from
Jun 8, 2022

Conversation

Protuhj
Copy link
Contributor

@Protuhj Protuhj commented Jun 6, 2022

The first is when you attack soon after crouching. If you timed it just right, attacking just before you went under a low ceiling would cause you to stand up and clip into the ceiling.

The second, which is related to the first, would happen if you stood up right at the edge of a ceiling. The code would find a tile above the character instead of below, since even when standing still, gravity causes the collision code to run assuming you're falling down.

Both of these situations are easiest to reproduce when on a moving platform.

I tested this extensively with --level=black-caverns-2 --cheat=give_master_key:

  • Jump onto the moving platform
  • Right before you pass under the edge of the ceiling, crouch -> stand -> attack
  • Another test is to hit down + up very fast right near the edge too

I'd suggest trying to cause it in the current version of the game, so you get the key presses that cause the issue

Attempts to address #2578 and #2456.

For #2578, I'm not sure how to have a repeatable test with being hit by a bat to knock you into the ceiling.

Also note that I'm testing at 144FPS and I think it's easier to reproduce at a lower framerate.

The first is when you attack soon after crouching. If you timed it just right, attacking just before you went under a low ceiling would cause you to stand up and clip into the ceiling.

The second, which is related to the first, would happen if you stood up right at the edge of a ceiling. The code would find a tile above the character instead of below, since even when standing still, gravity causes the collision code to run assuming you're falling down.

Both of these situations are easiest to reproduce when on a moving platform.
@niamu
Copy link
Member

niamu commented Jun 6, 2022

I am no good at being able to replicate the issue in the first place, but the code makes sense to me so I'd be willing to accept this in its current state. If no one else chimes in we can merge this.

@niamu niamu merged commit ff9fe9c into hawkthorne:master Jun 8, 2022
niamu pushed a commit to niamu/hawkthorne-journey that referenced this pull request Nov 18, 2024
The first is when you attack soon after crouching. If you timed it just right, attacking just before you went under a low ceiling would cause you to stand up and clip into the ceiling.

The second, which is related to the first, would happen if you stood up right at the edge of a ceiling. The code would find a tile above the character instead of below, since even when standing still, gravity causes the collision code to run assuming you're falling down.

Both of these situations are easiest to reproduce when on a moving platform.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants