CheeseLord / plaid

PLAtformer In D
MIT License
0 stars 0 forks source link

Collision detection code assumes linear trajectory, but gravity exists #18

Open kronmillerg opened 8 years ago

kronmillerg commented 8 years ago

Really, we should be doing collision calculations based on the player moving along a parabolic trajectory. I'm not sure how much of a difference this will make.

kronmillerg commented 8 years ago

Doing the gravity updates in a single chunk can cause weird artifacts when you jump on a bouncy platform. For the way we're currently doing it (all at the start of the frame), it's hard to tell if there's any systematic effect -- the player's bounce height seems to more or less randomly oscillate back and forth. But if you instead try to split the gravity update across the collision -- but still do it all at the start or all at the end of each portion of the trajectory -- then you get a systematic drift in the bounce height.