Re:HTML5 Games Workshop: Make a Platformer Game with JavaScript
by wareya on Wednesday April 05, 2017 @07:00PM
(#14046482)
I covered integration error in my first post here, point 3. The thing I was calling Box2D out for is the fact that it doesn't use a hacky way of rectifying collisions. It seeks out the point in time that they occur.
>It does not guarantee zero error: to do that you have to have an analytic method, which isn't applicable to a general-purpose physics simulation.
If you have constant acceleration, the analytic way to get the point you want to be at at the end of the frame is simple: just pretend your current frame is using half the added speed from the acceleration that you're going to undergo this frame. Or you could use a hermite curve or something.
Re:HTML5 Games Workshop: Make a Platformer Game with JavaScript
by buzzybee on Wednesday April 05, 2017 @07:23PM
(#14046608)
Those are the integration methods I was talking about. An analytic method without error is one which can describe the curve at any moment in time, not "constant acceleration per frame".
[0] https://en.wikipedia.org/wiki/Semi-implicit_Euler_method
edit: i did forward euler wrong