Game Development Reference
In-Depth Information
when you're modeling sports is the limits of the human body. Although records are
broken in every Olympics, no human being is able to jump 10 feet vertically into the
air. Unless you are breaking the limits of biomechanics on purpose, doing so will de‐
crease the realism of your game. The biomechanical statistics of what would be con‐
sidered an outstanding athlete are given in Table 19-2 .
Table 19-2. Table of human performance
Physical attribute
Average value
Record value
Jump from standstill (vertical)
81 cm
155 cm
Running jump height (high jump)
1.83 m
2.45 m
Jump distance
5.0 m
8.95 m
Throwing speed
24.5 m/s
46.0 m/s
Running speed over 100 m
7.5 m/s
10 m/s
Running speed over 10,000 m
3.7 m/s
6.3 m/s
Almost all sports records are available online somewhere, so Table 19-2 is by no means
exhaustive. However, it is a good idea to use these values to limit your simulations of
human actions in your video games. Obviously, part of the excitement of playing video
games is to be able to jump higher and run faster than you otherwise could, but a good
survey of biomechanics will at least let you know what is extraordinary and what is not.
Now let's take a look at how we would model a human actor in a sports game.
Modeling a Golf Swing
Let's say you're writing a golf game and you want include a little realism. An obvious
important element of the game is the golf swing. Another is the club-to-ball impact, and
still another is the trajectory of the ball in flight. You can use the projectile motion
modeling techniques discussed earlier in Chapter 2 , Chapter 4 , and Chapter 6 to model
the ball's flight, and the collision response techniques in Chapter 5 to model the club-
to-ball impact. But what about the golf swing?
Well, before we show you one way to model a golf swing, let's talk about why you would
want to do so in the first place. To model club-to-ball impact, you need to know the club
head velocity at the time of impact. That velocity is a function of the swing. The golfer
raises the club through his backswing, torques his body, and brings the club head down
in an arc while applying a torque with his wrists. As the club swings down, the wrist
torque reverses, and the club whips through the downswing until the club head collides
with the ball. (Or, in our case, collides with the ground!) Now, there are many subtle
details we've omitted here with regard to technique and the physics, but you get the
idea. At any rate, the swing determines the club head velocity at the moment of impact,
which in turn determines the velocity of the ball after impact.
Search Nedrilad ::

Custom Search