Game Development Reference
In-Depth Information
In looking at Equation (8.20), we can observe what parameters influence the acceleration
value of the car. Some conclusions are pretty obvious—the heavier the car, the lower the accel-
eration. If the gear and final drive ratios are increased, the acceleration is increased. Reducing
the rolling friction of the wheels increases the acceleration.
Keep in mind that Equation (8.20) represents the maximum acceleration available at a
given velocity. It's based on the wheel torque that would result if you pushed the gas pedal all
the way to the floor. In real life, using the maximum acceleration all the time would be a pretty
extreme way of driving. If the gas pedal was pushed only part way down, the actual torque applied
to the wheels would be some fraction of the maximum possible torque. For game programming
purposes, you might apply the maximum possible wheel torque if the gas pedal were pushed
all the way down, half the torque if the pedal were pushed halfway down, and so on.
The acceleration shown in Equation (8.20) assumes that the tires roll without slipping on
the ground. In many cases, the maximum available torque will generate a force that is greater
than the maximum frictional force between the tires and the ground. When this happens, the
wheels won't roll without slipping; instead, the wheels will spin across the road surface in the
classic “burning rubber” effect. We'll discuss tire slippage in the “Wheel Traction” section a
little later in this chapter.
Another thing to remember is that the acceleration equation shown in Equation (8.20) is
really an idealized case. It assumes there is no loss in engine torque as it goes through the trans-
mission and differential. In reality, there is some loss due to friction between the mechanical
parts. On the other hand, using straight lines to model the torque curve tends to underpredict
the engine torque. The two assumptions would somewhat cancel each other out, and for game
programming purposes, Equation (8.20) is probably sufficient.
Equation (8.20) or the alternative form shown in Equation (8.21) can be used to solve for
the velocity of the car over time. It turns out that there is a closed-form solution to Equation
(8.21), but it is quite messy and has different forms depending on the relative values of the c 1 ,
c 2 , and c 3 constants. It's easier if slightly slower to solve Equation (8.21) using our ODE solver,
and that's exactly what we'll do when we develop a car simulator later in this section.
Maximum Velocity
Equation (8.21) can be used to compute the theoretical maximum velocity that a car can achieve.
The maximum velocity will be the point where the net acceleration on the car is zero. But there
is a catch, because at lower gears the redline rpm will be reached before the net acceleration on
the car reaches zero. In this case, the maximum velocity, v max , of a car is limited by the redline
rpm value of the engine.
2
p
r
Ω
w li e
v
=
(8.23)
max
60
gG
k
At higher gears (with lower gear ratios) the maximum velocity of a car is drag-limited. Drag
will stop the car from accelerating any further before the redline rpm value is reached. If you
recall, the drag force is proportional to the square of the velocity of the car. As velocity increases,
the aerodynamic drag increases until a velocity is reached where the torque applied to the
wheels is exactly balanced by the aerodynamic drag and rolling friction experienced by the
vehicle. At this point the acceleration of the car, a , is zero.
2
acv cvc
=++=
0
(8.24)
1
2
3
Search WWH ::




Custom Search