Game Physics Cookbook
eBook - ePub

Game Physics Cookbook

  1. 480 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Game Physics Cookbook

Book details
Book preview
Table of contents
Citations

About This Book

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.

Frequently asked questions

Simply head over to the account section in settings and click on ā€œCancel Subscriptionā€ - itā€™s as simple as that. After you cancel, your membership will stay active for the remainder of the time youā€™ve paid for. Learn more here.
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
Both plans give you full access to the library and all of Perlegoā€™s features. The only differences are the price and subscription period: With the annual plan youā€™ll save around 30% compared to 12 months on the monthly plan.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, weā€™ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes, you can access Game Physics Cookbook by Gabor Szauer in PDF and/or ePUB format, as well as other popular books in Computer Science & Programming Games. We have over one million books available in our catalogue for you to explore.

Information

Year
2017
ISBN
9781787120815
Edition
1

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...

Table of contents

  1. Game Physics Cookbook