Physics and Your Digital Golf Game

The following is an interview with B.C. (Charlie) Rasco, president of Smarter Than You software and co-author of Game Programming Gems, 8th edition.

Digital Innovation Gazette: Tell us a little bit about your background. I have your title as president of Smarter Than You Software. So, what do you do?

B.C. (Charlie) Rasco: I’m a physicist by training. I got into game development after working at Boeing for a few years. I came out and made a few little games for Macs and PCs, and then I turned to slightly more specialized physics-based simulations — not necessarily for games — for some research at Oak Ridge and various universities around the U.S. The way the Game Programming Gems article came about is I made a little game for a company, a golf game, where you try to get the golf ball onto a tee. It’s a simple little game; it’s not meant to be anything special. But I wanted to make some nice, simple little physics games. When I did the first version, it didn’t feel right. I made modifications to it. I figured I should write this up for my own edification. After that, a call came out for this Game Programming Gems book and it seemed like a good place to put it.

DIG: You’ve written about drag physics. What is it and why is it important?

C.R.: It’s something that makes the games feel more realistic. There are two versions of it: One is the simplified version. People solved it hundreds of years ago. I implemented it for the golf-ball game, and it just didn’t feel like the ball was moving like it should.

So basically, I had to dig into this a little more to do the more realistic physics implementation of this drag, which is simply a ball moving through water. Implementing that turned out to be a fun little project. The goal for me is to make realistic physics and implement it in terms of simple little video games. A lot of these are not classic video games where you try to engage people in that manner. I like the simulation. I find it more satisfying when it works out well.

DIG: You talk about the two types of drag models. Is one better than the other?

C.R.: It really depends on what you need. The quadratic one feels right and looks right. But the other one is slightly more computationally expensive. Which one works better in what situation? If you have a single spaceship flying through the atmosphere, then that’s going to be your emphasis — so you’re willing to throw a little more computation at it. Otherwise, if you’ve got just a background situation with a bunch of little particles, you can go that route if people aren’t going to notice it that much. Once you have 10,000 things flying through the air, it feels like smoke.

I honestly don’t know which way would be better. The quadratic one would feel right, but whether you have enough computation to make that work is a good question. With the iPhone, it’s going to bump into that limit much faster than with a PlayStation 3. It really does depend on what your system is and where you’re going.