[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] My take on platform collision detection



On 6 Jan 2003, Shandy Brown wrote:

> I think you really MUST cap your fall speed, no matter what strategy you
> employ.  If the charactor falls at anything over his height per frame, I
> don't think he'd be controllable.

It's easy to predict if you would cross a platform on the next frame, and
I think that's the best model for collision detection.

About capping your fall speed, this also happens in reality, due to air
resistance, so it won't seem too artificial if you implement it, unless
the cap is too low.

Regarding movement state, the best approach from my point of view (I once
implemented a Spindizzy engine), is to have the acceleration of the object
as a state. That way, jumping is just changing the Y accel by some factor,
and then it's easy to implement sweeping over ice and other things.

Greetings,
Arturo


____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org