Game Development Reference
Figure 7-8. Stable results using the improved Euler or the Runge-Kutta methods
Here the oscillatory motion is clearly sinusoidal, as it should be. The results for this
particular problem are almost identical whether you use the improved Euler method or
the Runge-Kutta method. Since for this problem the results of both methods are virtually
the same, you can save computational time and memory using the improved Euler
method versus the Runge-Kutta method. This can be a significant advantage for real-
time games. Remember the Runge-Kutta method requires four derivative computations
per time step.
These methods aren't the only ones at your disposal, but they are the most common.
The Runge-Kutta method is particularly popular as a general-purpose numerical inte‐
gration scheme. Other methods attempt to improve computational efficiency even fur‐
ther—that is, they are designed to minimize truncation error while still allowing you to
take relatively large step sizes so as to reduce the number of steps you have to take in
your integration. Still other methods are especially tailored for specific problem types.
We cite some pretty good references for further reading on this subject in the Bibliog‐