Hot answers tagged

15

I personally prefer Velocity Verlet for most simulations. In my experience with this method, it is quite suitable for pretty stiff equations. It seems like this "improved Euler" method is pretty similar to the Velocity Verlet one and relies on a class of integration methods known as predictor-corrector. You can read a lot of things on these methods nowadays, ...


10

Q: Why use the advanced Runge Kutta? A: Because it's very exact. Q: Why not? A: Because you are making a game and a very exact physics engine doesn't matter, it just has to be good enough to fool the player. By the way, if you have got heavy dampening on collision, like most platformers would, a simple Euler is just fine. I strongly recommend that you ...


6

RK4 is an example of a numerical integrator. Euler integration is a similar concept, but it is much less precise. Numerical integration is not exact, but much better for a computer to handle in a real-time situation such as a game. The reason that you use RK4 instead of Euler is that RK4 takes into account the integration of the second and third ...


2

Integration should have nothing to do with calculating the TOI. I'm not sure where your problem is as RK4 only allows for more accurate results by allowing a more accurate acceleration curve during each time step. Remember acceleration is just the change in velocity over the time step. Thus vel = accel / dt or vel = accel * inverse_dt The swept box ...


1

The presentation has error. The method referred to by presenter as "Improved Euler" is actually Velocity Verlet method! See here for more authoritative source: http://www.physics.udel.edu/~bnikolic/teaching/phys660/numerical_ode/node5.html Also same equations are in Wikipedia. A common immediate improvement over Euler's method is Midpoint method which ...


1

To be frank: RK4 almost certainly isn't your biggest need right now. What's more, unless you're after very accurate game physics, I recommend against using Runge-Kutta entirely - it's simply more complication, and for most platformers standard Euler integration should be more than enough. In fact, most platformers don't really need that sort of physics at ...


1

Try this: run your Runge-Kutta integration to compute the motion, and then when it's done check for the bounce condition and update your state. It worked for me. And yes, this does mean that you still have to patch up the inter-penetration like you would with Euler integration. I can't claim this authoritatively, but I think step changes don't go well with ...


Only top voted, non community-wiki answers of a minimum length are eligible