Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 21 in printed book and digital formats -- plus a one-year subscription (beginning with 22.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview


Buy Now

Issue 1.4

REVIEW

Physics for Game Developers

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

Excerpt of article text...

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.

...End of Excerpt. Please purchase the magazine to read the full article.