I am self-taught and have successfully coded simple collisions of planes, spheres, rays and up until interactive cloth simulations so I do have some basic sense of which part of the physics goes where in code; but no idea of the terminologies.

It's the jargon that I do not understand: What is a physics solver? How does a solver look like in code or which part of the engine is considered a solver?

For example what does the phrase "Box2d is using iterative solver" mean?


2 Answers 2


Generally physics engines are split into two major parts: Collision detection and collision resolution. The solver is just responsible for the second part.

After your collision detection part determines which pairs of objects collide, and where, the solver is responsible for creating the correct physical response.

"Iterative solver" just means that the solver uses an iterative method to calculate those responses. It's iterative because you can, for various reasons, not calculate a completely physically accurate response in physics engines. Therefor these engines perform certain approximations (via numerical integration) to the correct physical response.

These approximations are done more than once per simulation frame (hence, "iterative") since it generally gets more accurate the more iterations of these approximations you have.

  • \$\begingroup\$ with regards to the "iterative method", does it mean that the engine probably provides a counter to set how many iterations per frame usually? \$\endgroup\$
    – Jake
    Commented May 5, 2012 at 8:59
  • \$\begingroup\$ Usually, yes. In Box2D, for example, the number of iterations for position and velocity updates is set directly in the b2World.Step method. \$\endgroup\$
    – TravisG
    Commented May 5, 2012 at 11:39

As far as I know, physics can be split up in two areas: Collision detection and resolving collisions / constraints. While the first one detects collisions, the seconds job would be to adjust bodies positions and velocities in order to (a) get them collision-free ASAP and (b) assure all their constraints (joints, etc.) are met at all times.

Note that I'm not experienced in developing physics engines. I work with the Farseer physics engine but mostly keep my hands off its code and just use it, so I'm more or less guessing here.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .