Game Physics Integrators: Energy Drift of Four Time-Stepping Methods at Frame Rate (2D)
Four spring-mass trajectories against the exact oscillation, with live energy-versus-time curves and an error-versus-step-size plot. The same shared model as the 3D scene: explicit and semi-implicit Euler, velocity Verlet and RK4.
Four identical springs are stepped with four different integrators at a chosen frame rate: explicit Euler, semi-implicit (symplectic) Euler, velocity Verlet and fourth-order Runge-Kutta, next to the exact solution. Change the spring frequency, the frame rate and the damping and watch explicit Euler gain energy and blow up while the symplectic methods stay bounded. Growth factors, conserved shadow energy and convergence orders are checked numerically.
Four spring-mass trajectories against the exact oscillation, with live energy-versus-time curves and an error-versus-step-size plot. The same shared model as the 3D scene: explicit and semi-implicit Euler, velocity Verlet and RK4.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install