Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

up vote 4 down vote accepted

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.

share|improve this answer
    
with regards to the "iterative method", does it mean that the engine probably provides a counter to set how many iterations per frame usually? –  Jake May 5 '12 at 8:59
    
Usually, yes. In Box2D, for example, the number of iterations for position and velocity updates is set directly in the b2World.Step method. –  TravisG May 5 '12 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.

share|improve this answer
    
Thanks for answering the first part of the question. –  Jake May 5 '12 at 15:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.