Corner Thrust Bug

Issue #9 resolved
Chris Logsdon
created an issue

So, this has been around for a while. The last time I sought out to solve it, I came to the conclusion that it is related to jumping.

When you hit what we see as a "corner", it's really the top of the platform. When you hit the top of the platform, the jumpTimer is reset, which then allows another jump to occur. If you're holding spacebar down to get the maximum height of your jump, you will immediately start another jump as soon as the timer is reset (as soon as you hit the "corner").

I haven't tested it, but I'm quite certain that the Y velocity of the corner thrust is equivalent to that of a jump, which would prove that this is likely the cause.

Now, I'm not entirely sure how to fix this in a clean and elegant way. What do you think?

Comments (1)

  1. Chris Logsdon reporter

    Fixed by allowing only one jump per key down of spacebar. Hit spacebar once, you jump. You won't jump again until you let go of spacebar and press it again.

    This fixes the "automatic" thrust that came from the corners. The player can still manually cause the "thrust" by pressing space bar the instant he hits the "corner". This, however is an issue related to collision detection, and will be discussed in a separate Issue.

    An inconvenience that this fix produces is that the players jumps are only one height. You can no longer quickly tap spacebar to produce a small jump. For now, this will have to be worked around when designing levels

  2. Log in to comment