A short while ago, I posted that I'd just received Physics for Game Programmers. I was on vacation last week, and it seemed like a good book to read. So I did. And I really liked it. Herewith, my review.
First of all, I should point out again that this book was sent to me by the publisher, for free, presumably in the hopes that I would give it a favorable review here. I like to think that this doesn't bias me, but I wanted to make sure I pointed this out clearly in the interest of full disclosure.
The book is divided roughly into two parts. The first part deals with general physical concepts, like what happens when two objects collide, and the equations governing projectiles. As a guy with a Masters degree in Electrical Engineering, I know a fair amount about basic physics, and am pretty comfortable with math, but even still I definitely learned a few things. I could have used the bit about how rotating objects collide a few years back when I was writing a DirectX demo. One of the more interesting topics was the aerodynamic effect of spin on projectiles (think curveball).
The second part of the book is what you might call “applied game physics”. There are chapters on things like how to model cars, boats, and various sports games, using the principles outlined in the first part of the book. I thought this was a pretty reasonable approach. Although I'm not writing a game that requires this sort of simulation at the moment, if I were I think there would be plenty here for me to make use of. For example, I liked the presentation of damage models for armored vehicles.
As far as the style of the book goes, I think that's actually where it really shines. The author has a way of explaining things that's thorough without being verbose. He also does a good job of keeping the scope limited to what I could actually fit in my head over the course of a week of relatively relaxed reading. As a result, the book weighs in at a reasonable 400 pages or so. I like that it's not an 800-page monster that tries to address everything under the sun.
There are a couple of places where I might have liked to see a bit more treatment of a particular subject. For instance, the author punts on the topic of three-dimensional collisions of rotating objects. This is a pretty reasonable compromise, particularly in service of keeping the book manageable, but because it's a topic that I've had to address in the past, I found myself somewhat disappointed to find it elided in the text. Still, I have to admit that there's enough material in there that I could likely work it out from what was presented.
One thing I should point out is that this is more a book about physics than it is about games. Although the author includes quite a few sample applications, they're hardly the sort of thing that you'd play on a Saturday night: they're more like simple demonstration programs. But again, in the service of simplicity, I see this as a good thing.
Speaking of simplicity, let me mention math. There's a fair amount of it in the book. The integral symbol appears a few times, and differential equations make a frequent appearance. This may challenge some people, but frankly, if you can't handle some math, you can't handle game programming anyway. And I think the author does a pretty good job of explaining the basics, although I may be a poor judge, since I was already familiar with all the mathematical concepts he presented. In any event, there's code that implements most of the equations he presents, which should help most people.
As a final note, the source code presented in the book is in Java. As a C# guy, I found this to be dead easy to read, so I never even bothered to grab the C# translation that's available on the website.
In summary, I definitely liked this book. It's a nice length, the style is pleasantly clear, and the material is a pretty good balance of depth and breadth. If you're writing a program where things fly through the air, collide, explode, or fall, this is a handy resource. Like I said before: “Physics. Games. Programming. What's not to love?”
Posted
May 17 2005, 06:45 AM
by
craig-andera