An updated best-seller offers advice for using physics concepts to increase the realism of computer games, covering mechanics, real-world situations and real-time simulations, with new chapters on deformable and soft bodies, fluids and the physics of sound. Original.
An updated guide offers advice for using physics concepts to increase the realism of computer games, covering mechanics, real-world situations, and real-time simulations, with new chapters on deformable and soft bodies, fluids, and the physics of sound.
If you want to enrich your game’s experience with physics-based realism, the expanded edition of this classic book details physics principles applicable to game development. You’ll learn about collisions, explosions, sound, projectiles, and other effects used in games on Wii, PlayStation, Xbox, smartphones, and tablets. You’ll also get a handle on how to take advantage of various sensors such as accelerometers and optical tracking devices.
Authors David Bourg and Bryan Bywalec show you how to develop your own solutions to a variety of problems by providing technical background, formulas, and a few code examples. This updated book is indispensable whether you work alone or as part of a team.
- Refresh your knowledge of classical mechanics, including kinematics, force, kinetics, and collision response
- Explore rigid body dynamics, using real-time 2D and 3D simulations to handle rotation and inertia
- Apply concepts to real-world problems: model the behavior of boats, airplanes, cars, and sports balls
- Enhance your games with digital physics, using accelerometers, touch screens, GPS, optical tracking devices, and 3D displays
- Capture 3D sound effects with the OpenAL audio API
| Preface |
|
xi | |
|
|
|
|
|
|
3 | (32) |
|
|
|
3 | (1) |
|
|
|
4 | (2) |
|
|
|
6 | (1) |
|
|
|
7 | (1) |
|
Derivatives and Integrals |
|
|
8 | (1) |
|
Mass, Center of Mass, and Moment of Inertia |
|
|
9 | (11) |
|
Newton's Second Law of Motion |
|
|
20 | (4) |
|
|
|
24 | (5) |
|
|
|
29 | (6) |
|
|
|
35 | (36) |
|
Velocity and Acceleration |
|
|
36 | (3) |
|
|
|
39 | (2) |
|
|
|
41 | (1) |
|
|
|
42 | (3) |
|
|
|
45 | (1) |
|
|
|
46 | (1) |
|
|
|
47 | (1) |
|
|
|
48 | (1) |
|
|
|
48 | (1) |
|
|
|
49 | (5) |
|
Kinematic Particle Explosion |
|
|
54 | (7) |
|
|
|
61 | (1) |
|
|
|
62 | (1) |
|
Angular Velocity and Acceleration |
|
|
62 | (9) |
|
|
|
71 | (14) |
|
|
|
71 | (1) |
|
|
|
72 | (1) |
|
|
|
73 | (2) |
|
|
|
75 | (1) |
|
|
|
76 | (1) |
|
|
|
77 | (2) |
|
|
|
79 | (1) |
|
|
|
80 | (3) |
|
|
|
83 | (2) |
|
|
|
85 | (18) |
|
|
|
87 | (4) |
|
|
|
91 | (3) |
|
|
|
94 | (1) |
|
|
|
95 | (1) |
|
|
|
95 | (1) |
|
|
|
95 | (4) |
|
|
|
99 | (4) |
|
|
|
103 | (16) |
|
Impulse-Momentum Principle |
|
|
104 | (1) |
|
|
|
105 | (7) |
|
Linear and Angular Impulse |
|
|
112 | (3) |
|
|
|
115 | (4) |
|
|
|
119 | (24) |
|
|
|
120 | (4) |
|
|
|
124 | (8) |
|
|
|
132 | (6) |
|
|
|
138 | (5) |
|
Part II Rigid-Body Dynamics |
|
|
|
|
|
143 | (18) |
|
Integrating the Equations of Motion |
|
|
144 | (2) |
|
|
|
146 | (7) |
|
|
|
153 | (6) |
|
|
|
159 | (2) |
|
|
|
161 | (28) |
|
|
|
166 | (3) |
|
|
|
169 | (1) |
|
|
|
170 | (1) |
|
|
|
170 | (2) |
|
Implementing External Forces |
|
|
172 | (3) |
|
|
|
175 | (1) |
|
Particle-to-Ground Collisions |
|
|
175 | (6) |
|
Particle-to-Obstacle Collisions |
|
|
181 | (5) |
|
|
|
186 | (3) |
|
9 2D Rigid-Body Simulator |
|
|
189 | (16) |
|
|
|
190 | (7) |
|
|
|
197 | (1) |
|
|
|
198 | (2) |
|
|
|
200 | (1) |
|
|
|
201 | (3) |
|
|
|
204 | (1) |
|
10 Implementing Collision Response |
|
|
205 | (22) |
|
Linear Collision Response |
|
|
206 | (7) |
|
|
|
213 | (14) |
|
11 Rotation in 3D Rigid-Body Simulators |
|
|
227 | (16) |
|
|
|
228 | (4) |
|
|
|
232 | (2) |
|
|
|
234 | (5) |
|
Quaternions in 3D Simulators |
|
|
239 | (4) |
|
12 3D Rigid-Body Simulator |
|
|
243 | (12) |
|
|
|
243 | (4) |
|
|
|
247 | (3) |
|
|
|
250 | (5) |
|
|
|
255 | (26) |
|
|
|
257 | (1) |
|
|
|
258 | (1) |
|
|
|
258 | (7) |
|
|
|
265 | (1) |
|
|
|
265 | (10) |
|
|
|
275 | (6) |
|
|
|
281 | (12) |
|
Building Your Own Physics Engine |
|
|
281 | (2) |
|
|
|
283 | (1) |
|
Simulated Objects Manager |
|
|
284 | (1) |
|
|
|
285 | (1) |
|
|
|
286 | (1) |
|
|
|
287 | (1) |
|
|
|
288 | (5) |
|
Part III Physical Modeling |
|
|
|
|
|
293 | (28) |
|
|
|
294 | (3) |
|
|
|
297 | (5) |
|
|
|
302 | (1) |
|
|
|
303 | (2) |
|
|
|
305 | (16) |
|
|
|
321 | (18) |
|
|
|
323 | (1) |
|
|
|
323 | (2) |
|
|
|
325 | (1) |
|
|
|
326 | (1) |
|
|
|
327 | (1) |
|
|
|
327 | (1) |
|
|
|
328 | (1) |
|
|
|
328 | (1) |
|
Resistance and Propulsion |
|
|
328 | (1) |
|
|
|
328 | (6) |
|
|
|
334 | (1) |
|
|
|
335 | (1) |
|
Rudders and Thrust Vectoring |
|
|
336 | (3) |
|
|
|
339 | (14) |
|
|
|
339 | (1) |
|
|
|
339 | (1) |
|
|
|
340 | (1) |
|
|
|
341 | (1) |
|
|
|
342 | (3) |
|
|
|
345 | (1) |
|
|
|
345 | (2) |
|
|
|
347 | (3) |
|
|
|
350 | (3) |
|
|
|
353 | (16) |
|
|
|
353 | (2) |
|
|
|
355 | (2) |
|
|
|
357 | (3) |
|
Breathing and Body Position |
|
|
360 | (1) |
|
|
|
361 | (1) |
|
|
|
362 | (1) |
|
|
|
363 | (3) |
|
|
|
366 | (3) |
|
|
|
369 | (34) |
|
|
|
370 | (3) |
|
Solving the Golf Swing Equations |
|
|
373 | (5) |
|
|
|
378 | (2) |
|
|
|
380 | (3) |
|
|
|
383 | (3) |
|
|
|
386 | (2) |
|
|
|
388 | (5) |
|
|
|
393 | (10) |
|
|
|
|
|
|
403 | (10) |
|
|
|
403 | (1) |
|
|
|
403 | (1) |
|
|
|
404 | (1) |
|
Infrared and Optical Imaging |
|
|
404 | (1) |
|
Exotic: Dispersive Signal and Surface Acoustic Wave |
|
|
404 | (1) |
|
|
|
404 | (1) |
|
|
|
404 | (4) |
|
|
|
408 | (2) |
|
|
|
410 | (1) |
|
|
|
410 | (1) |
|
|
|
411 | (1) |
|
|
|
411 | (1) |
|
Modeling Touch Screens in Games |
|
|
411 | (1) |
|
Difference from Mouse-Based Input |
|
|
412 | (1) |
|
|
|
412 | (1) |
|
|
|
413 | (14) |
|
|
|
414 | (2) |
|
|
|
416 | (1) |
|
Common Accelerometer Specifications |
|
|
417 | (1) |
|
|
|
417 | (1) |
|
|
|
418 | (2) |
|
|
|
420 | (1) |
|
Using Tilt to Control a Sprite |
|
|
420 | (1) |
|
|
|
421 | (6) |
|
22 Gaming from One Place to Another |
|
|
427 | (12) |
|
|
|
427 | (1) |
|
Geocaching and Reverse Geocaching |
|
|
428 | (1) |
|
|
|
428 | (1) |
|
|
|
428 | (1) |
|
|
|
429 | (1) |
|
Two-Dimensional Mathematical Treatment |
|
|
429 | (4) |
|
Location, Location, Location |
|
|
433 | (1) |
|
|
|
433 | (2) |
|
|
|
435 | (1) |
|
|
|
436 | (3) |
|
23 Pressure Sensors and Load Cells |
|
|
439 | (12) |
|
|
|
440 | (1) |
|
Example Effects of High Pressure |
|
|
440 | (2) |
|
|
|
442 | (2) |
|
|
|
444 | (4) |
|
|
|
448 | (3) |
|
|
|
451 | (20) |
|
|
|
451 | (3) |
|
|
|
454 | (1) |
|
The Left and Right Frustums |
|
|
454 | (4) |
|
|
|
458 | (1) |
|
Complementary-Color Anaglyphs |
|
|
458 | (1) |
|
Linear and Circular Polarization |
|
|
459 | (3) |
|
|
|
462 | (1) |
|
|
|
463 | (2) |
|
|
|
465 | (2) |
|
Programming Considerations |
|
|
467 | (1) |
|
|
|
467 | (2) |
|
|
|
469 | (2) |
|
|
|
471 | (6) |
|
|
|
472 | (1) |
|
|
|
472 | (1) |
|
|
|
473 | (1) |
|
Numerical Differentiation |
|
|
474 | (3) |
|
|
|
477 | (18) |
|
|
|
477 | (4) |
|
Characteristics of and Behavior of Sound Waves |
|
|
481 | (1) |
|
|
|
481 | (2) |
|
|
|
483 | (1) |
|
|
|
484 | (1) |
|
|
|
485 | (1) |
|
|
|
486 | (2) |
|
|
|
488 | (1) |
|
|
|
489 | (1) |
|
|
|
489 | (2) |
|
|
|
491 | (4) |
| A Vector Operations |
|
495 | (12) |
| B Matrix Operations |
|
507 | (10) |
| C Quaternion Operations |
|
517 | (12) |
| Bibliography |
|
529 | (6) |
| Index |
|
535 | |
David Bourg is a Naval Architect involved in various military and commercial proposal, design, and construction efforts. Since 1998, David has served as an independent consultant working for various regional clients engaged in both commercial and military shipbuilding where he provides design and analysis services including but not limited to concept design, proposal writing, detailed design and analysis, visualization, and software development among other services. He coordinated and led the winning design and proposal effort for the US Coast Guard Point Class (patrol boat) Replacement Program. In 2006, David joined fellow Naval Architect Kenneth Humphreys to form MiNO Marine, LLC, a naval architecture and marine professional services firm. In addition to Physics for Game Developers, David has published two other books. He earned a PhD in Engineering and Applied Science in 2008 from the University of New Orleans. He has served as an Adjunct Professor at the University of New Orleans School of Naval Architecture and Marine Engineering, where he has taught various courses since 1993. Ever since his father read A Brief History of Time to him in middle school, Bryan Bywalec wanted to be an astrophysicist. While he will always have a passion for pure physics, he became more and more obsessed in high school with the application of those physical principles he was learning. Having been around sailboats his entire life, his decision to seek a degree in Naval Architecture at the University of New Orleans surprised few. While working on his degree, Mr. Bywalec was employed as a network administrator for the College of Engineering. Having an office in an electronics lab, he explored the world of enterprise computing and became very interested in high performance clusters, remote administration of desktops, and robotics. Upon graduating in 2007, he began his career at MiNO Marine, LLC and, under the guidance of David Bourg and Kenneth Humphreys, now focuses on finite element analysis of complex welded steel structures. His structural analysis work depends largely on the accurate approximations of non-linear physical systems. Bryan has completed several computational fluid dynamics simulations of exhaust gases from ship stacks and current flow around offshore structures. In addition to his work as a naval architect, Bryan strives to create innovative ways to connect everyday objects to various control networks. From unlocking door locks via text message to developing a real time street car tracking program, he constantly searches for opportunities to integrate technology into his life.