Hacker News new | ask | show | jobs
by JabavuAdams 4926 days ago
This is still basically wrong for general game physics. I.e. you should not blindly follow the author's suggestion to use it for all forces.

It happens to be an exact solution for one very specific situation -- the case of a constant force that is always applied. In this case, unvarying gravity with no air resistance.

This is typically one of the first things you learn in a Classical Mechanics course, because they can teach it using just Kinematics (the definitions of displacement, velocity, and acceleration) before introducing Dynamics (forces).

To prove it, you can just integrate the definition of acceleration twice and recognize that the integration constants are your initial position and velocity.

If the time-step changes or if forces are due to input, or other changing factors then this is still a pretty terrible method.

Ah ... I should clarify ... the method is not so terrible, but rather the author's explanation and rationale are. Basically, it slightly improves on one little piece of the puzzle, and completely ignores the real issues like fixed time steps, render/physics/network/game logic loop decoupling, and stiff systems.

FWIW, I shipped two hit games this year that only used Euler integration and worse hacks. It made life painful, though.