Muutke küpsiste eelistusi

E-raamat: Game Physics Engine Development: How to Build a Robust Commercial-Grade Physics Engine for your Game 2nd edition [Taylor & Francis e-raamat]

(Gwent, UK)
  • Formaat: 552 pages, 10 Halftones, black and white; 100 Illustrations, black and white
  • Ilmumisaeg: 23-Jul-2010
  • Kirjastus: Focal Press US
  • ISBN-13: 9780429099441
Teised raamatud teemal:
  • Taylor & Francis e-raamat
  • Hind: 258,50 €*
  • * hind, mis tagab piiramatu üheaegsete kasutajate arvuga ligipääsu piiramatuks ajaks
  • Tavahind: 369,29 €
  • Säästad 30%
  • Formaat: 552 pages, 10 Halftones, black and white; 100 Illustrations, black and white
  • Ilmumisaeg: 23-Jul-2010
  • Kirjastus: Focal Press US
  • ISBN-13: 9780429099441
Teised raamatud teemal:

Physics is really important to game programmers who need to know how to add physical realism to their games. They need to take into account the laws of physics when creating a simulation or game engine, particularly in 3D computer graphics, for the purpose of making the effects appear more real to the observer or player.The game engine needs to recognize the physical properties of objects that artists create, and combine them with realistic motion.

The physics ENGINE is a computer program that you work into your game that simulates Newtonian physics and predict effects under different conditions. In video games, the physics engine uses real-time physics to improve realism.

This is the only book in its category to take readers through the process of building a complete game-ready physics engine from scratch. The Cyclone game engine featured in the book was written specifically for this book and has been utilized in iPhone application development and Adobe Flash projects. There is a good deal of master-class level information available, but almost nothing in any format that teaches the basics in a practical way. The second edition includes NEW and/or revised material on collision detection, 2D physics, casual game physics for Flash games, more references, a glossary, and end-of-chapter exercises. The companion website will include the full source code of the Cyclone physics engine, along with example applications that show the physics system in operation.

--A truly accessible text that allows even novice programmers to create powerful physics engines for their games.

--Covers particle effects, flight simulation, car pysics, crates, destructible objects, cloth and ragdolls, and more.

--Supports each new concept with diagrams, code, end-of-chapter exercises and resources.

--This edition includes completely NEW material on: collision detection, 2D physics, casual game physics for Flash games.

--Powerful associated website offering: the full source code of the Cyclone physics engine, along with example applications that show the physics system in operation. The Cyclone engine has been used in commercial game development.



Physics is really important to game programmers who need to know how to add physical realism to their games. They need to take into account the laws of physics when creating a simulation or game engine, particularly in 3D computer graphics, for the purpose of making the effects appear more real to the observer or player.The game engine needs to recognize the physical properties of objects that artists create, and combine them with realistic motion.

The physics ENGINE is a computer program that you work into your game that simulates Newtonian physics and predict effects under different conditions. In video games, the physics engine uses real-time physics to improve realism.

This is the only book in its category to take readers through the process of building a complete game-ready physics engine from scratch. The Cyclone game engine featured in the book was written specifically for this book and has been utilized in iPhone application development and Adobe Flash projects.  There is a good deal of master-class level information available, but almost nothing in any format that teaches the basics in a practical way. The second edition includes NEW and/or revised material on collision detection, 2D physics, casual game physics for Flash games, more references, a glossary, and end-of-chapter exercises. The companion website will include the full source code of the Cyclone physics engine, along with example applications that show the physics system in operation. 

List Of Figures xix
Preface To The Second Edition xxiii
Preface To The First Edition xxv
Acknowledgments xxvii
About The Author xxix
Chapter 1 Introduction
1(14)
1.1 What Is Game Physics?
2(1)
1.2 What Is A Physics Engine?
2(3)
1.2.1 Advantages Of A Physics Engine
3(1)
1.2.2 Weaknesses Of A Physics Engine
4(1)
1.3 Approaches To Physics Engines
5(3)
1.3.1 Types Of Objects
5(1)
1.3.2 Contact Resolution
6(1)
1.3.3 Impulses And Forces
6(1)
1.3.4 What We're Building
7(1)
1.4 The Mathematics Of Physics Engines
8(2)
1.4.1 The Math You Need To Know
8(1)
1.4.2 The Math We'll Review
9(1)
1.4.3 The Math I'll Introduce
10(1)
1.5 The Source Code In The Book
10(1)
1.6 How The Book Is Structured
11(6)
1.6.1 Exercises And Projects
12(3)
Part I Particle Physics 15(60)
Chapter 2 The Mathematics Of Particles
17(30)
2.1 Vectors
17(21)
2.1.1 The Handedness Of Space
21(2)
2.1.2 Vectors And Directions
23(2)
2.1.3 Scalar And Vector Multiplication
25(2)
2.1.4 Vector Addition And Subtraction
27(2)
2.1.5 Multiplying Vectors
29(1)
2.1.6 The Component Product
30(1)
2.1.7 The Scalar Product
31(2)
2.1.8 The Vector Product
33(4)
2.1.9 The Orthonormal Basis
37(1)
2.2 Calculus
38(6)
2.2.1 Differential Calculus
38(5)
2.2.2 Integral Calculus
43(1)
2.3 Summary
44(1)
2.4 Exercises
45(2)
Chapter 3 The Laws Of Motion
47(14)
3.1 The Particle
48(1)
3.2 The First Two Laws
49(6)
3.2.1 The Force Equations
50(1)
3.2.2 Adding Mass To Particles
51(1)
3.2.3 Momentum And Velocity
52(1)
3.2.4 The Force Of Gravity
53(2)
3.3 The Integrator
55(3)
3.3.1 The Update Equations
55(2)
3.3.2 The Complete Integrator
57(1)
3.4 Summary
58(1)
3.5 Exercises
59(2)
Chapter 4 The Particle Physics Engine
61(14)
4.1 Ballistics
61(5)
4.1.1 Setting Projectile Properties
62(1)
4.1.2 Implementation
63(3)
4.2 Fireworks
66(7)
4.2.1 The Fireworks Data
66(1)
4.2.2 Firework Rules
67(2)
4.2.3 The Implementation
69(4)
4.3 Summary
73(1)
4.4 Projects
73(2)
Part II Mass Aggregate Physics 75(80)
Chapter 5 Adding General Forces
77(12)
5.1 D'alembert's Principle
77(3)
5.2 Force Generators
80(7)
5.2.1 Interfaces And Polymorphism
81(1)
5.2.2 Implementation
81(3)
5.2.3 A Gravity Force Generator
84(1)
5.2.4 A Drag Force Generator
85(2)
5.3 Built-In Gravity And Damping
87(1)
5.4 Summary
87(1)
5.5 Exercises
88(1)
Chapter 6 Springs And Spring-Like Things
89(24)
6.1 Hook's Law
89(3)
6.2 Spring-Like Force Generators
92(9)
6.2.1 A Basic Spring Force Generator
92(2)
6.2.2 An Anchored Spring Generator
94(2)
6.2.3 An Elastic Bungee Generator
96(2)
6.2.4 A Buoyancy Force Generator
98(3)
6.3 Stiff Springs
101(9)
6.3.1 The Stiff Springs Problem
102(2)
6.3.2 Faking Stiff Springs
104(6)
6.4 Summary
110(1)
6.5 Exercises
110(3)
Chapter 7 Hard Constraints
113(32)
7.1 Simple Collision Resolution
113(5)
7.1.1 The Closing Velocity
114(1)
7.1.2 The Coefficient Of Restitution
115(1)
7.1.3 The Collision Direction And The Contact Normal
115(2)
7.1.4 Impulses
117(1)
7.2 Collision Processing
118(12)
7.2.1 Collision Detection
121(2)
7.2.2 Resolving Interpenetration
123(3)
7.2.3 Resting Contacts
126(4)
7.3 The Contact Resolver Algorithm
130(6)
7.3.1 Resolution Order
131(4)
7.3.2 Time-Division Engines
135(1)
7.4 Collision-Like Things
136(6)
7.4.1 Cables
137(3)
7.4.2 Rods
140(2)
7.5 Summary
142(1)
7.6 Exercises
142(3)
Chapter 8 The Mass Aggregate Physics Engine
145(10)
8.1 Overview Of The Engine
145(6)
8.2 Using The Physics Engine
151(2)
8.2.1 Rope Bridges And Cables
151(1)
8.2.2 Friction
152(1)
8.2.3 Blob Games
153(1)
8.3 Summary
153(1)
8.4 Projects
154(1)
Part III Rigid-Body Physics 155(96)
Chapter 9 The Mathematics Of Rotations
157(50)
9.1 Rotating Objects In 2d
158(7)
9.1.1 The Mathematics Of Angles
158(1)
9.1.2 Angular Speed
159(1)
9.1.3 The Origin And The Center Of Mass
160(5)
9.2 Orientation In 3d
165(7)
9.2.1 Euler Angles
165(2)
9.2.2 Axis-Angle
167(1)
9.2.3 Rotation Matrices
168(1)
9.2.4 Quaternions
169(3)
9.3 Angular Velocity And Acceleration
172(1)
9.3.1 Velocity Of A Point
173(1)
9.3.2 Angular Acceleration
173(1)
9.4 Implementing The Mathematics
173(30)
9.4.1 The Matrix Classes
174(1)
9.4.2 Matrix Multiplication
175(9)
9.4.3 Matrix Inverse And Transpose
184(7)
9.4.4 Converting A Quaternion To A Matrix
191(2)
9.4.5 Transforming Vectors
193(4)
9.4.6 Changing The Basis Of A Matrix
197(1)
9.4.7 The Quaternion Class
198(2)
9.4.8 Normalizing Quaternions
200(1)
9.4.9 Combining Quaternions
200(1)
9.4.10 Rotating
201(1)
9.4.11 Updating By The Angular Velocity
202(1)
9.5 Summary
203(1)
9.6 Exercises
203(4)
Chapter 10 Laws Of Motion For Rigid Bodies
207(24)
10.1 The Rigid Body
207(4)
10.2 Newton-2 For Rotation
211(9)
10.2.1 Torque
211(2)
10.2.2 The Moment Of Inertia
213(3)
10.2.3 Inertia Tensor In World Coordinates
216(4)
10.3 D'alembert For Rotation
220(6)
10.3.1 Force Generators
223(3)
10.4 The Rigid-Body Integration
226(2)
10.5 Summary
228(1)
10.6 Exercises
228(3)
Chapter 11 The Rigid-Body Physics Engine
231(20)
11.1 Overview Of The Engine
231(3)
11.2 Using The Physics Engine
234(13)
11.2.1 A Flight Simulator
234(8)
11.2.2 A Sailing Simulator
242(5)
11.3 Summary
247(1)
11.4 Projects
248(3)
Part IV Collision Detection 251(82)
Chapter 12 Collision Detection
253(38)
12.1 The Collision Detection Pipeline
254(1)
12.2 Broad-Phase Collision Detection
255(2)
12.2.1 Requirements
256(1)
12.3 Bounding Volume Hierarchies
257(19)
12.3.1 Hierarchies
259(7)
12.3.2 Building The Hierarchy
266(9)
12.3.3 Subobject Hierarchies
275(1)
12.4 Spatial Partitioning
276(12)
12.4.1 Binary Space Partitioning
276(5)
12.4.2 Oct-Trees And Quad-Trees
281(2)
12.4.3 Grids
283(4)
12.4.4 Multiresolution Maps
287(1)
12.5 Summary
288(1)
12.6 Exercises
288(3)
Chapter 13 Generating Contacts
291(42)
13.1 Collision Geometry
292(2)
13.1.1 Primitive Assemblies
293(1)
13.2 Contact Generation
294(10)
13.2.1 Contact Types
295(3)
13.2.2 Contact Data
298(2)
13.2.3 Vertex—face Contacts
300(1)
13.2.4 Edge -Edge Contacts
301(1)
13.2.5 Edge–face Contacts
301(1)
13.2.6 Face–face Contacts
302(1)
13.2.7 Testing Before Generating Contacts
303(1)
13.3 Simple Collision Algorithms
304(15)
13.3.1 Colliding Two Spheres
305(2)
13.3.2 Colliding A Sphere And A Plane
307(3)
13.3.3 Colliding A Box And A Plane
310(5)
13.3.4 Colliding A Box And A Sphere
315(4)
13.4 Separating Axis Tests
319(9)
13.4.1 Generating Contact Data With SATS
320(2)
13.4.2 Colliding Two Boxes
322(4)
13.4.3 Colliding Convex Polyhedra
326(2)
13.5 Coherence
328(3)
13.6 Summary
331(1)
13.7 Exercises
331(2)
Part V Contact Physics 333(128)
Chapter 14 Collision Resolution
335(52)
14.1 Impulse And Impulsive Torque
335(5)
14.1.1 Impulsive Torque
336(2)
14.1.2 Rotating Collisions
338(1)
14.1.3 Handling Rotating Collisions
339(1)
14.2 Collision Impulses
340(15)
14.2.1 Change To Contact Coordinates
340(7)
14.2.2 Velocity Change By Impulse
347(4)
14.2.3 Impulse Change By Velocity
351(1)
14.2.4 Calculating The Desired Velocity Change
351(2)
14.2.5 Calculating The Impulse
353(1)
14.2.6 Applying The Impulse
353(2)
14.3 Resolving Interpenetration
355(9)
14.3.1 Choosing A Resolution Method
355(4)
14.3.2 Implementing Nonlinear Projection
359(3)
14.3.3 Avoiding Overrotation
362(2)
14.4 The Collision Resolution Process
364(20)
14.4.1 The Collision Resolution Pipeline
365(2)
14.4.2 Preparing Contact Data
367(5)
14.4.3 Resolving Penetration
372(7)
14.4.4 Resolving Velocity
379(2)
14.4.5 Alternative Update Algorithms
381(3)
14.5 Summary
384(1)
14.6 Exercises
385(2)
Chapter 15 Resting Contacts And Friction
387(26)
15.1 Resting Forces
388(2)
15.1.1 Force Calculations
389(1)
15.2 Microcollisions
390(5)
15.2.1 Removing Accelerated Velocity
392(1)
15.2.2 Lowering The Restitution
393(1)
15.2.3 The New Velocity Calculation
394(1)
15.3 Types Of Friction
395(4)
15.3.1 Static And Dynamic Friction
395(3)
15.3.2 Isotropic And Anisotropic Friction
398(1)
15.4 Implementing Friction
399(11)
15.4.1 Friction As Impulses
400(2)
15.4.2 Modifying The Velocity Resolution Algorithm
402(5)
15.4.3 Putting It All Together
407(3)
15.5 Friction And Sequential Contact Resolution
410(1)
15.6 Summary
411(1)
15.7 Exercises
412(1)
Chapter 16 Stability And Optimization
413(24)
16.1 Stability
413(8)
16.1.1 Quaternion Drift
414(1)
16.1.2 Interpenetration On Slopes
415(2)
16.1.3 Integration Stability
417(2)
16.1.4 The Benefit Of Pessimistic Collision Detection
419(1)
16.1.5 Changing Mathematical Accuracy
420(1)
16.2 Optimizations
421(15)
16.2.1 Sleep
422(8)
16.2.2 Margins Of Error For Penetration And Velocity
430(2)
16.2.3 Contact Grouping
432(2)
16.2.4 Code Optimizations
434(2)
16.3 Summary
436(1)
Chapter 17 Putting It All Together
437(24)
17.1 Overview Of The Engine
437(2)
17.2 Using The Physics Engine
439(19)
17.2.1 Ragdolls
440(5)
17.2.2 Fracture Physics
445(6)
17.2.3 Explosive Physics
451(7)
17.3 Limitations Of The Engine
458(1)
17.3.1 Stacks
458(1)
17.3.2 Reaction Force Friction
458(1)
17.3.3 Joint Assemblies
459(1)
17.3.4 Stiff Springs
459(1)
17.4 Summary
459(1)
17.5 Projects
459(2)
Part VI Further Topics In Physics 461(30)
Chapter 18 Physics In Two Dimensions
463(12)
18.1 2d Or 3d?
463(2)
18.2 Vector Mathematics
465(2)
18.3 Particle And Mass Aggregate Physics
467(1)
18.4 The Mathematics Of Rotation
467(2)
18.4.1 Representing Rotation
467(2)
18.4.2 Matrices
469(1)
18.5 Rigid-Body Dynamics
469(2)
18.6 Collision Detection
471(2)
18.6.1 Vertex—edge Contacts
472(1)
18.6.2 Edge—edge Contacts
472(1)
18.6.3 Contact Generation
472(1)
18.7 Collision Response
473(1)
18.8 Summary
473(1)
18.9 Projects
474(1)
Chapter 19 Other Programming Languages
475(8)
19.1 Actionscript 3
475(4)
19.2 C
479(1)
19.3 Java
480(1)
19.4 C#
481(1)
19.5 Other Scripting Languages
482(1)
Chapter 20 Other Types Of Physics
483(8)
20.1 Simultaneous Contact Resolution
483(5)
20.1.1 The Jacobian
484(1)
20.1.2 The Linear-Complementarity Problem
485(3)
20.2 Reduced Coordinate Approaches
488(1)
20.3 Summary
489(2)
Appendix A Useful Inertia Tensors 491(6)
A.1 Discrete Masses
492(1)
A.2 Continuous Masses
492(1)
A.3 Common Shapes
493(2)
A.3.1 Cuboid
493(1)
A.3.2 Sphere
493(1)
A.3.3 Cylinder
494(1)
A.3.4 Cone
494(1)
A.3.5 Hemisphere
495(1)
A.4 Moments Of Inertia In 2d
495(4)
A.4.1 Common 2d Shapes
495(2)
Appendix B Useful Friction Coefficients 497(2)
Appendix C Mathematics Summary 499(6)
C.1 Vectors
499(1)
C.2 Quaternions
500(1)
C.3 Matrices
501(1)
C.4 Integration
502(1)
C.5 Physics
503(1)
C.6 Other Formulas
504(1)
Glossary 505(4)
Bibliography 509(2)
Index 511
Ian Millington is a partner of IPR Ventures, a consulting company developing next-generation AI technologies for entertainment, modeling, and simulation. Previously he founded Mindlathe Ltd, the largest specialist AI middleware company in computer games, working with on a huge range of game genres and technologies. He has a long background in AI, including PhD research in complexity theory and natural computing. He has published academic and professional papers and articles on topics ranging from paleontology to hypertext.