Review: Beginning Math and Physics for Game Programmers by Wendy Stahler

beginning_math_and_physics

Beginning Math and Physics for Game Programmers by Wendy Stahler is the kind of book I like. The title is straight-forward, and the content actually delivers what it claims. I’ve read a number of game development math books but I find that many of them expect a college level mathematics background, or at least some intermediate knowledge already. Not here. This is a book that is accessible to stark beginners, and I’d even recommend it to high school students.

Stahler’s text covers all the basics for both 3D math and physics. Topics include: points and lines, geometry, trigonometry, vector and matrix math, transformations, unit conversions, motion, Newton’s laws, energy and momentum, collisions, and, finally, rotational motion. Clocking in at around 500 pages, there is enough space to delve into each area with adequate coverage. I found the explanations to be very clear and geared to novices.  The author uses lines like: “The fancy name for moving objects in these directions is translation.” While advanced readers may feel somewhat patronized by the language, I actually think this is a great approach for beginners. 3D programming is not easy, but sometimes the arcane conventions used in more advanced books can be off-putting to people just getting started.

One thing I should note, I don’t typically test code samples or verify the accuracy of formulas while I’m progressing through the text. What I expect from the book is to gain a high-level conceptual understanding of the material in order to better grasp the subject matter. When it comes to the actual programming implementation, I will just use the book as a reference but usually find the formula online on Wikipedia or similar sites. I realize some people expect every code sample to work, but I’m not one of those people. It’s the concepts themselves that are important to learn and once you understand you should be able to know what to search for or even implement the code yourself.

One aspect I appreciated was that most of the concepts started with an explanation first in one dimension, then two, then three.  This was especially helpful as it’s conceptually simple to understand something like motion in only 1 dimension and it gradually builds upon that. Some other books jump straight into higher dimensions right off the bat, and that may be difficult to some without prior knowledge. The author also provides ample diagrams, graphs, charts and sample code. She also makes effort to show unit conversions when needed, and emphasizes differences between easily confused units.

Wendy Stahler’s book is, however, somewhat dated being originally published in 2004. While the core material is still relevant, and hasn’t really changed much in those years, some of the samples are written for antique computer systems. For example, for one demo included on the CD-ROM she recommends that the “minimum system requirements for the program are a 700MHz processor, a graphics card with 8MB of memory, and 64MB of RAM.” Those specs would have been laughable even in 2004, when the book originally came out. However, it is humbling to consider my smart-watch has specs that would put the machine those demos were build for to shame.

Overall I enjoyed the book, even with the caveat the nearly all the material was a refresher for me. If you are already a professional game developer, then there probably won’t be much to learn here. I’ve been kind of on a binge of game math and physics books, so I figured I’d give this a shot. I also like to have material to recommend to people new to game development and I find it interesting to read books of different levels to get a broader perspective. If you are just starting out, this may be a nice resource to get your feet wet before graduating to the more complex, but much better math books out there.