Special

Clearance Sale!

We've been publishing for over five years now and it's time to clear out our inventory of back issues, so we're slashing prices!

RBD Magazines

Check out this amazing clearance sale of all our past issues. Missing some issues? This is a great time to complete your RBD collection. Save up to 40% off the regular price of our printed back issue packages. These prices are only good until the end of the year May 2008 and supplies are limited, so place your order today.

Article Preview


Buy Now

Print:
PDF:

Review

Physics for Game Developers

Issue: 1.4 (February/March 2003)
Author: Joe Strout
Article Description: No description available.
Article Length (in bytes): 4,002
Starting Page Number: 8
RBD Number: 1402
Resource File(s): None
Related Link(s): None
Known Limitations: None

Full text of article...

In this book, author David Bourg provides a basic, but practical, introduction to physics simulation for game programmers. This is not a book about REALbasic, but it is nonetheless something any RB game developer should consider keeping on the shelf.

The book is mostly concerned with simulating objects in motion and can be roughly divided into three parts. The first part provides a thorough treatment of how forces, acceleration, and velocity interact to produce both linear and rotational motion. The second part examines a number of particular systems -- airplanes, projectiles, cars, and so on -- and shows how to find the various forces that are at work in each case. The last section of the book gets into the nitty-gritty of actually simulating these systems, and takes the reader through several simple but interesting demos.

To follow this book, you'll need to have a basic understanding of calculus, including the concepts of differentiation and integration. Equations are presented in their full glory, Greek symbols and all. But if it's been a long time since you took Calculus -- or haven't yet reached that level in school -- you will still be able to understand and apply most of the book. In most cases you can skip the derivation of a particular formula and go straight to the final answer, which is generally much simpler. If all else fails, you can follow the code samples, which ultimately do nothing more than basic arithmetic. Working through the math will help you understand it more deeply and extend it to new situations, but you can also go a long way by simply following the examples like recipes in a cookbook. The code samples are all presented in C++, and the demos (which you can download from the O'Reilly web site) run only on Windows. This is unfortunate, but it only slightly diminishes the value of the book. The code provided is only demo code; you would have to substantially rework it to use it in your own applications anyway. Converting from C++ to REALbasic, or from Direct3D to RB3D, won't slow you down too much. In fact in many cases you'll find that you have less work to do, since you have the Vector3D and Quaternion classes built in.

There are a small number of methods defined on the the author's Vector and Quaternion classes that are not present in REALbasic; for these, see the code in the appendix of the book, and make a similar function in REALbasic. Also, watch out for the author's unconventional use of operators; see the table for some conversions you'll need to make when reading the author's code. Finally, REALbasic doesn't provide a Matrix class; you'll want to implement that directly from Appendix B.

Physics for Game Developers does a great job of presenting the information you need in a practical way and at just the right level of detail. If you have any interest in making things fly, float, bump, or bounce, then you should own this book.

In Brief
 
Title
Physics for Game Developers
 
Author
David M. Bourg
 
Publisher
O'Reilly (ISBN#:0-596-00006-5)
 
Price
US $39.95
 
Pros
Topics detail are just what the game developer

needs

 
Cons
No MacOS demos; Assumes college-level math skills
 
Rating (1.0-5.0): 4.5

v1 * v2 v1.Dot(v2)

v1 ^ v2 v1.Cross(v2)

v1 * scalar v1.Times(scalar)

QVRotate(q, v) q.Transform(v)

Syntax used in the book (left) and the RB equivalent (right).

End of article.

Article copyrighted by REALbasic Developer magazine. All rights reserved.


 


|

 


Weblog Commenting and Trackback by HaloScan.com