Physics Engines for Dummies
wildbunny.co.uk
wildbunny.co.uk
http://www.digitalrune.com/Portals/0/Documents/A%20Unified%2...
(Had to google for a fresh link; unfortunately this doesn't seem to be nearly as widely mirrored as I believe it deserves.)
Things I liked about it:
- The author continually explains, compares, & contrasts alternative approaches throughout.
- It builds up a full actual system, including a lot of discussion of what other references may dismiss as mere software engineering.
- The author starts with the fundamentals and goes from there, usually fairly thoroughly.
For every article like this one, there's quite a few people posting "here's another awesome tutorial!" -- and yes, guilty as charged.
Also, this is much closer to a textbook in scope & depth, which (a) turns a lot of people away, despite being a fantastic resource and (b) makes it less blog-able.
http://www.digitalrune.com/Products/Physics/Overview.aspx
(Also unsure if actual source is available as part of the license or not.)
(EDIT: source is available at an unspecified additional cost if you really want it.)
Also check out the speculative contacts post: http://www.wildbunny.co.uk/blog/2011/03/25/speculative-conta...
Even if your physics algorithms are wholly fake, you need quality contact resolution, or strange behavior will appear in collision responses, since any collision response is predicated on having correct contact information. (The consequence of bad contact quality, seen in lesser physics engines, is major errors where shapes can "squeeze through" other shapes or jitter against each other, gaining energy and eventually exploding.)
Zips are here: http://code.google.com/p/box2d/downloads/list
Another example: in the C64 game Thrust, a rocket drags a ball which is attached with a stick. The ball is like a pendulum, hanging from the rocket. Now if the rocket accelerates, how will the pendulum swing, and where will it pull the rocket? Another way to view this is a big ball with a rocket on it's skin, that can accelerate in any direction. How much of the acceleration will turn into velocity and how much into spin?
Maybe I should be able to figure out the latter case by simply drawing vectors, but last time I tried my knowledge of physics was insufficient.