Building a 2D Game Physics Engine : Using HTML5 and JavaScript
معرفی کتاب «Building a 2D Game Physics Engine : Using HTML5 and JavaScript» نوشتهٔ Jackie Bolen و Tanaya, Michael;Chen, Hua Ming;Pavleas, Jebediah;Sung, Kelvin، منتشرشده توسط نشر Apress : Springer e-books : Imprint : Apress : Springer e-books در سال 2017. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است.
Build your very own 2D physics-based game engine simulation system for rigid body dynamics. Beginning from scratch, in this book you will cover the implementation technologies, HTML5 and JavaScript; assemble a simple and yet complete fundamental mathematics support library; define basic rigid body behaviors; detect and resolve rigid body collisions; and simulate collision responses after the collisions.In this way, by the end of __Building a 2D Game Physics Engine__, you will have an in‐depth understanding of the specific concepts and events, implementation details, and actual source code of a physics game engine that is suitable for building 2D games or templates for any 2D games you can create and can be played across the Internet via popular web‐browsers.**What You'll Learn** * Gain an understanding of 2D game engine physics and how to utilize it in your own games Describe the basic behaviors of rigid bodies* Detect collisions between rigid bodies * Resolve interpretations after rigid body collisions * Model and implement rigid body impulse responses **Who This Book Is For**Game enthusiasts, hobbyists, and anyone who is interested in building their own 2D physics game engines but is unsure of how to begin. Contents at a Glance......Page 5 Contents......Page 6 About the Authors......Page 10 About the Technical Reviewer......Page 12 Acknowledgments......Page 13 Introduction......Page 14 Chapter 1: Introduction to 2D Game Physics Engine Development......Page 16 Setting Up Your Development Environment......Page 17 Working in the NetBeans Development Environment......Page 18 Creating an HTML5 Project in NetBeans......Page 19 HTML5 Canvas Project......Page 23 Drawing Core......Page 24 Creating the Core Script......Page 25 Creating User Control Script......Page 27 Using the User Control Script......Page 28 Summary......Page 29 Chapter 2: Implementing the 2D Physics Engine Core......Page 30 Creating the Library......Page 31 Physics Engine and Rigid Shapes......Page 32 The Rigid Shape Project......Page 33 The Rigid Shape Base Class......Page 34 The Rigid Rectangle Class......Page 35 The Rigid Circle Class......Page 37 Modify the User Control Script......Page 38 Integrate into the Core......Page 39 Define the Initial Scene......Page 40 Modify the index.html File......Page 41 The Core Engine Loop......Page 42 Engine Loop Implementations......Page 43 Implement the Engine Loop Component......Page 44 Rigid Shape Base Class......Page 46 The Rectangle Class......Page 47 Modify User Control Script......Page 49 Observation......Page 50 Summary......Page 51 Chapter 3: Incorporating Collision Detection......Page 52 Interpenetration of Colliding Objects......Page 53 The Broad Phase Method Project......Page 55 Define the Physics Engine Component......Page 56 Invoke the Physics Collision and Update the UI......Page 57 Modify Rigid Shape Classes......Page 58 Collision Information......Page 60 The Circle Collision Detection Project......Page 61 Define Collision Information Object......Page 62 Compute Collision Information Between Two Circles......Page 63 Case for Collision with a Rectangle......Page 65 Modify Physics Engine Component......Page 66 Separating Axis Theorem......Page 67 A Simple SAT-based Algorithm......Page 69 Support Point May Not Exist for a Face Normal......Page 71 The Axis of Least Penetration and Collision Information......Page 72 The Rectangle Collision Project......Page 73 Modify Rectangle Collision......Page 74 Collision Between Rectangles and Circles......Page 77 The Rectangle Circle Collision Project......Page 78 Modify Rectangle Collision......Page 79 Summary......Page 84 Chapter 4: Completing the Physics Engine and Rigid Shape Component......Page 85 Movement......Page 86 Explicit Euler Integration......Page 87 The Rigid Shape Movement Project......Page 88 Modify the Engine Core......Page 89 Implement Symplectic Euler Integration......Page 90 Modify the RigidShape Class......Page 91 Modify the Circle and Rectangle Classes......Page 93 Modify the updateUIEcho Function......Page 94 Modify the userControl function......Page 95 Observation......Page 96 Resolving Interpenetrations......Page 97 The Positional Correction Project......Page 98 Update the Physics Engine......Page 99 Resolving Collisions......Page 101 Decomposing the Velocity in a Collision......Page 102 Relative Velocity of Colliding Shapes......Page 103 Approximating the Impulse Response......Page 105 The Steps for Resolving Collisions......Page 106 The Collision Impulse Project......Page 107 Modify the Physics Engine Component......Page 108 Defining an Initial Rectangle in Mygame.js......Page 109 Supporting Rotation in Collision Response......Page 110 Formulating Impulse Method with Rotation......Page 111 The Angular Impulse Project......Page 114 Observation......Page 116 Summary......Page 117 The Concepts and Theories......Page 118 The Engine Source Code......Page 119 Modifying Simulation Scene......Page 121 Observation......Page 122 Physics Topics......Page 123 Collision Detection Topics......Page 124 Reference......Page 125 Index......Page 126 Build your very own 2D physics-based game engine simulation system for rigid body dynamics. Beginning from scratch, in this book you will cover the implementation technologies, HTML5 and JavaScript; assemble a simple and yet complete fundamental mathematics support library; define basic rigid body behaviors; detect and resolve rigid body collisions; and simulate collision responses after the collisions. In this way, by the end of Building a 2D Game Physics Engine , you will have an in‐depth understanding of the specific concepts and events, implementation details, and actual source code of a physics game engine that is suitable for building 2D games or templates for any 2D games you can create and can be played across the Internet via popular web‐browsers. What You'll Learn Gain an understanding of 2D game engine physics and how to utilize it in your own games Describe the basic behaviors of rigid bodies Detect collisions between rigid bodies Resolve interpretations after rigid body collisions Model and implement rigid body impulse responses Who This Book Is For Game enthusiasts, hobbyists, and anyone who is interested in building their own 2D physics game engines but is unsure of how to begin.
دانلود کتاب Building a 2D Game Physics Engine : Using HTML5 and JavaScript