Game Physics Cookbook
eBook - ePub

Game Physics Cookbook

Gabor Szauer

Compartir libro
  1. 480 páginas
  2. English
  3. ePUB (apto para móviles)
  4. Disponible en iOS y Android
eBook - ePub

Game Physics Cookbook

Gabor Szauer

Detalles del libro
Vista previa del libro
Índice
Citas

Información del libro

Discover over 100 easy-to-follow recipes to help you implement efficient game physics and collision detection in your gamesAbout This Book• Get a comprehensive coverage of techniques to create high performance collision detection in games• Learn the core mathematics concepts and physics involved in depicting collision detection for your games• Get a hands-on experience of building a rigid body physics engineWho This Book Is ForThis book is for beginner to intermediate game developers. You don't need to have a formal education in games—you can be a hobbyist or indie developer who started making games with Unity 3D.What You Will Learn• Implement fundamental maths so you can develop solid game physics• Use matrices to encode linear transformations• Know how to check geometric primitives for collisions• Build a Physics engine that can create realistic rigid body behavior• Understand advanced techniques, including the Separating Axis Theorem• Create physically accurate collision reactions• Explore spatial partitioning as an acceleration structure for collisions• Resolve rigid body collisions between primitive shapesIn DetailPhysics is really important for game programmers who want to add realism and functionality to their games. Collision detection in particular is a problem that affects all game developers, regardless of the platform, engine, or toolkit they use.This book will teach you the concepts and formulas behind collision detection. You will also be taught how to build a simple physics engine, where Rigid Body physics is the main focus, and learn about intersection algorithms for primitive shapes.You'll begin by building a strong foundation in mathematics that will be used throughout the book. We'll guide you through implementing 2D and 3D primitives and show you how to perform effective collision tests for them. We then pivot to one of the harder areas of game development—collision detection and resolution.Further on, you will learn what a Physics engine is, how to set up a game window, and how to implement rendering. We'll explore advanced physics topics such as constraint solving. You'll also find out how to implement a rudimentary physics engine, which you can use to build an Angry Birds type of game or a more advanced game.By the end of the book, you will have implemented all primitive and some advanced collision tests, and you will be able to read on geometry and linear Algebra formulas to take forward to your own games!Style and approachGain the necessary skills needed to build a Physics engine for your games through practical recipes, in an easy-to-read manner. Every topic explained in the book has clear, easy to understand code accompanying it.

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es Game Physics Cookbook un PDF/ePUB en línea?
Sí, puedes acceder a Game Physics Cookbook de Gabor Szauer en formato PDF o ePUB, así como a otros libros populares de Ciencia de la computación y Programación de juegos. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Año
2017
ISBN
9781787120815

Game Physics Cookbook


Table of Contents

Game Physics Cookbook
Credits
About the Author
Acknowledgements
About the Reviewer
Acknowledgements
www.PacktPub.com
eBooks, discount offers, and more
Why Subscribe?
Customer Feedback
Preface
What this book covers
What you need for this book
Who this book is for
Sections
Getting ready
How to do it…
How it works…
There's more…
See also
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Vectors
Introduction
Vector definition
Getting ready
How to do it…
How it works…
There's more…
The W component
Component-wise operations
Getting ready
How to do it…
How it works…
Addition
Subtraction
Multiplication (Vector and Scalar)
Comparison
There's more…
Dot product
How to do it…
How it works…
There's more…
Geometric definition
Magnitude
Getting ready
How to do it…
How it works…
There's more…
Normalizing
Getting ready
How to do it…
How it works…
Cross product
Getting ready
How to do it…
How it works…
Angles
Getting ready
How to do it…
How it works…
There's more…
Radians and degrees
Projection
Getting ready
How to do it…
How it works…
Reflection
Getting ready
How to do it…
How it works…
2. Matrices
Introduction
Matrix definition
Getting ready
How to do it…
How it works…
Transpose
Getting ready
How to do it…
How it works…
Multiplication
Getting ready
How to do it…
How it works…
Identity matrix
Getting ready
How to do it…
How it works…
Determinant of a 2x2 matrix
How to do it…
How it works…
Matrix of minors
Getting ready
How to do it…
How it works…
Minor of a 2x2 matrix
Minor of a 3x3 matrix
Cofactor
Getting ready
How to do it…
How it works…
Determinant of a 3x3 matrix
Getting ready
How to do it…
How it works…
Operations on a 4x4 matrix
Getting ready
How to do it…
How it works…
Adjugate matrix
Getting ready
How to do it…
How it works…
Matrix inverse
Getting ready
How to do it…
How it works…
There's more…
Expanding the inverse
3. Matrix Transformations
Introduction
Matrix majors
Translation
Getting Ready
How to do it…
How it works…
Scaling
Getting ready
How to do it…
How it works…
How rotations work
Getting ready
How to do it…
How it works…
Rotation matrices
Getting ready
How to do it…
How it works…
X-Basis vector
Y-Basis vector
Z-Basis vector
There's more…
X and Y rotation
Axis angle rotation
Getting ready
How to do it…
How it works…
Vector matrix multiplication
Getting ready
How to do it…
How it works…
Transform matrix
Getting ready
How to do it…
How it works…
View matrix
Getting ready
How to do it…
How it works…
Projection matrix
Getting ready
How to do it…
How it works…
4. 2D Primitive Shapes
Introduction
2D points
Getting ready
How to do it…
How it works…
2D lines
Getting ready
How to do it…
How it works…
Circle
Getting ready
How to do it…
How it works…
Rectangle
Getting ready
How to do it…
How it works…
Oriented rectangle
Getting ready
How to do it…
How it works…
Point containment
Getting ready
How to do it…
How it works…
Point on a line
Point in a circle
Point in a rectangle
Point in an oriented rectangle
Line intersection
Getting ready
How to do it…
How it works…
Line circle
Line rectangle
Line oriented rectangle
5. 2D Collisions
Introduction
Circle to circle
Getting ready
How to do it…
How it works…
Circle to rectangle
Getting ready
How to do it…
How it works…
There's more…
Circle to oriented rectangle
Getting ready
How to do it…
How it works…
Rectangle to rectangle
Getting ready
How to do it…
How it works…
Separating Axis Theorem
Getting ready
How to do it…
How it works…
There's more…
Determining which axis to test
Rectangle to oriented rectangle
Getting ready
How to do it…
How it works…
Oriented rectangle to oriented rectangle
Getting ready
How to do it…
How it works…
6. 2D Optimizations
Introduction
Containing circle
Getting ready
How to do it…
How it works…
Containing rectangle
Getting ready
How to do it…
How it works…
Simple and complex shapes
Getting ready
How to do it…
How it works…
Quad tree
Getting ready
How to do it…
How it works…
Broad phase collisions
Getting ready
How to do it…
How it works…
7. 3D Primitive Shapes
Introduction
Point
Getting ready
How to do it…
How it works…
Line segment
Getting ready
How to do it…
How it works…
Ray
Ge...

Índice