David Kaemmer - GPL programmer home
Interview

by John O'Keefe

When and what caused you to first fall in Love with Racing?

It was probably a slot car set that my parents got me for Christmas in 1972. Oddly enough, the cars that came with it were 1967-like GP cars (pre-wing), and the track was supposed to be Monza (but only by virtue of having a crossover and one banked turn). My family lived in what was then Rhodesia, in southern Africa, which explains how a US citizen managed to get his hands on a Grand Prix-based slot car set. We then moved back to the US, specifically Indiana, which, for those of you fresh in from outer space, is the home of the Indianapolis Motor Speedway. I still remember sitting in the car one beautiful, sunny Memorial Day weekend, while my parents and sisters enjoyed a picnic, so that I could follow the exploits of my hero, Tom Sneva (a.k.a. The Gas Man), on the radio.

When and what caused you to first become interested in the physics of a race car?

The physics started to interest me only when we (Papyrus) had decided to do Indianapolis 500 for EA. At the time I was actually more interested in doing a flight sim - I was very interested in real-time 3D graphics. But I knew right away that a Pole Position-like arcade game at Indy would not hold anyone's interest for long - most especially mine. So I decided to try to do "Flight Simulator on a race track". I started looking into the physics involved - doing a lot of reading - and pretty soon I was hooked.

Who is your favorite race car driver of all time and why?

Graham Hill, I would say. I read his autobiography, and apart from his being a tremendously talented driver, he seemed to be someone who knew how to enjoy life. He had a great attitude toward adversity; laugh at it, accept it, put your head down and move on.

What is your favorite race car and why?

The '67 Championship winning Brabham BT24. It was judged at the time to be underpowered old technology, but in fact it was a triumph of light, simple, practical design - the holy grail of engineering.

What made you decide to create your own computer racing simulation (Indy 500)?

We wanted to develop an original game - I most wanted to do a flight sim - and after talking with EA, I decided that doing a real-time 3D racing game would be just as interesting. Even better, EA was willing to pay us money to do it! Of course, it turned out that I was wrong; doing a real-time 3D racing game was much more interesting than a flight sim.

What challenges did you have to overcome to create Indy 500?

At the time, many people still had 4.77 MHz 8088 PC's, the 80286 based AT machines were fairly new, and the smoking hot top-end machines were 25 Mhz386's - with EGA graphics! Remember that flight simulators were considered good at the time if they got frame rates above 8-10 fps. I felt it was important to have the highest frame rate possible, and I was confident that we could get up to 15 fps sustained! I also wanted to have a full field of 33 cars (player plus 32 AI cars), since this was Indy. So everything was written in assembly language, for speed. Space was also at a premium, since we couldn't use more than about 570K of RAM. Writing the physics in assembler, using fixed-point math, was one large challenge. Another was creating a graphics database that looked like the speedway, but used no more than about 30 polygons per frame! (We use that many polys in a tire, today.) The other main challenge was getting the CPU to drive 32 AI cars without slowing to a crawl.

What is the most difficult part of getting a racing simulation to "feel" right?

It's all physics. The most difficult part is writing a multi-body physics simulation, followed closely by writing functions to calculate the forces from the tires, aero drag, etc. that feed into that simulation. Oh no, wait, the most difficult part is getting it all to run in real-time, with sufficient CPU cycles left over to put some kind of graphics on screen.

How have your own real life racing experiences helped you in the development of a racing simulation?

The single biggest thing that I learned from racing real cars is just how much steering is done with your feet. I actually started racing a few months before I was able to "drive" the GPL physics engine - although it was already well along in development. Having actually driven at speed helped me to understand what was going on when I first started to slide the GPL physics model. There were a lot of times that I thought to myself, "I've had that happen in the Barber cars," rather than, "I wonder if that's what it's like." The biggest help has been the other way around: driving GPL has helped me quite a bit in driving the real cars. I find that I have developed a lot of good car control habits, and I actually find myself thinking, "I've had that happen in GPL, so that's what it feels like!"

What courses in College best prepared you for creating a motorsports simulation?

There are no surprises here: Calculus, Physics (mechanics), Linear Algebra, Numerical Analysis. I now wish I had gone to an engineering school, and studied Mechanical Engineering. Oh, a few Computer Science courses can't hurt - although you should start programming as soon as you can read - learn assembly language, too.

If someone was interested in learning how to create a racing simulation or wants to learn about racing physics what three books would you recommend?

"Race Car Vehicle Dynamics" by Bill & Doug Milliken, "Tune to Win" by Carroll Smith (read anything and everything by Carroll Smith) and The Classic Motorbooks catalog. The best book about race driving technique is "Going Faster" from The Skip Barber Racing School.

Do you have any other suggestions for those who may be interested in getting involved creating a racing simulation?

Get into therapy, now!

Could you give people insight into how complex the Grand Prix Legends simulation is? For example I heard somewhere that you model the airflow into or through the engine? What are some of the most complex aspects of GPL?

For the engines, I use a model for engine friction that I got from a couple of SAE papers - the friction is a function of inlet valve diameter, stroke length, etc. - and it seems to be pretty close (we have data for all these parameters for each of the cars). The most complex aspects of GPL ... how much time do you have? The multi-body simulation is very accurate. Each GPL car is made up of the chassis, the fuel mass (which changes), four wheels with independent hops and spins, an engine & flywheel rotor, clutch & transmission input shaft, transfer shaft, and output shaft. Each of these bodies maintains its own linear and angular momentum, basically. You can see some of this if you watch the car land on its top after flying through the air (and who hasn't seen this?) - just when the car lands, you'll see the wheels each continue to travel downwards until the springs stop them. If you jump the car in the air (the 'Ring - woohoo), you can see all the gyroscopic effects that occur when you turn the steering wheel in mid-flight, or stay on the throttle, or jump on the brakes (doh). Some might say this is overkill, but not those of us who know the kink before Schwedenkreuz. The tire model is also extremely complex and accurate. There has been a lot of excellent work recently by those who have PhDs in the physics of tire and rubber friction, and we have incorporated a lot of that into the current model. The differential deserves some mention; notice that with a near open diff (85/85, with 1 clutch), you have no trouble getting inside rear wheelspin. Or try starting with one wheel on the grass and one on the road. The constraints which apply within the drivetrain are non-trivial. The collision system is pretty complex - and that's an understatement. Outside of the physics, obviously the graphics system is pretty complex, the multiplayer system design, the AI - I can't do anything but scratch the surface here, but suffice it to say that the GPL model is several orders of magnitude more complex than anything we've done before.

What aspects of GPL would you like to improve on in the near future?

The graphics, sound, AI ... I'm happy with the physics model, for now. GPL is actually the first simulation that I'm really happy with, out of all the sims we've done. I'm still having a lot of fun with it, and I've been playing for years!

Being the leader in the motorsports simulation field and taking into consideration the rapid advancements in 3D cards and processors what do you visualize the typical racing simulation to be like 5 years from now?

I think without a doubt the graphics will be approaching photorealism - higher resolutions, more visual detail in the environments and cars, greatly enhanced lighting and shadows, variable weather effects.