How to make a small physics engine ?

Started by
11 comments, last by Mach2 18 years, 5 months ago
I have most of the books that have been mentioned above, and have found each to be very useful. However, for the "this is my first physics engine" crowd, I would recommend "Physics for Game Developers". It is on of the O'Reilly books, and although I am not a huge fan of their code sample style, it is an excellent introduction to the needs of a basic physics engine. In saying this, I am guessing that you are interested in writing a basic rigid body simulation. Once you have graduated to that stage, I would recommend moving on to "Game Physics" and "Real-time Collision Detection" which are two of my favorites. I hope this helps.

Scott
Advertisement
Quote:Original post by scott_l_smith
...However, for the "this is my first physics engine" crowd, I would recommend "Physics for Game Developers"....


I'd personally recommend not reading (or buying) that book - it's full of mistakes, bad explanations and the example code is badly written, buggy, and barely works etc etc... (using left-handed coord system and imperial units IIRC does not endear it to me...).

That sounds (and is) rather negative, so in an effort to be balance that:

Using the Chris Hecker articles as an introduction, followed by Baraff's siggraph notes and then the decent books mentioned here should give you a good overview of all the basics you need to know, though using these for your first implementation would be daunting. Then there's a bunch of papers (most you can find on the web for free) worth reading - some of which will make everything seem very complicated, and some of which will make everything seem very simple! I'm pretty sure someone who posts here has made a web page with a list of most of the common/useful papers - but I've lost the link - will look for it!

One important thing is to write some little test projects as you go along, starting with simple stuff. They'll give you a code-base - e.g. you'll develop a maths library, and a basic rendering framework for testing - that will make it a lot easier when you come to write the hard stuff. And at the end of it you'll have some nice demos for job interviews :)
Quote:Original post by MrRowl
Using the Chris Hecker articles as an introduction, followed by Baraff's siggraph notes and then the decent books mentioned here should give you a good overview of all the basics you need to know, though using these for your first implementation would be daunting. Then there's a bunch of papers (most you can find on the web for free) worth reading - some of which will make everything seem very complicated, and some of which will make everything seem very simple! I'm pretty sure someone who posts here has made a web page with a list of most of the common/useful papers - but I've lost the link - will look for it!

One important thing is to write some little test projects as you go along, starting with simple stuff. They'll give you a code-base - e.g. you'll develop a maths library, and a basic rendering framework for testing - that will make it a lot easier when you come to write the hard stuff. And at the end of it you'll have some nice demos for job interviews :)


I think that is the best recommendation. At least I found it works for my case.
I worked at my little physic demo for the last 4 months and although I still don't have much in it right now (just a couple of stacking cubes and bouncing around), I realized that I learned quite a lot from it. I started from scratch with some articles (Baraff's and Baltman's), some theses (Baraff's and Erleben's) and some nice demos as my "ultimate target" (b34r's and MrRowl's). After a while I bought the two books (Game Physics and Real-time Collision Detection) and i think that all the topics in the books is "nothing new" since you can almost find them in the net in form of articles, codes... (but i still recommend you these books since it will save you some times).

My experiences: Yes I did start with simple things, a small rendering framework, write my own math library (matrix, vector, quaternion,...) and start with collision detection between two cubes (maybe not a wise start) then apply impulse, integrate it and finally after everything work fine, I start to stacking boxes. I'm stopping doing it right now because of my time constraint but I will definitely come back to stacking more boxes sometimes later! It's so exciting...

This topic is closed to new replies.

Advertisement