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.

- 480 pages
- English
- ePUB (mobile friendly)
- Available on iOS & Android
eBook - ePub
Game Physics Cookbook
About this book
Trusted byĀ 375,005 students
Access to over 1 million titles for a fair monthly price.
Study more efficiently using our study tools.
Information
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
- Game Physics Cookbook
Frequently asked questions
Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn how to download books offline
Perlego offers two plans: Essential and Complete
- Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
- Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
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 990+ topics, weāve got you covered! Learn about our mission
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 about Read Aloud
Yes! You can use the Perlego app on both iOS and Android devices to read anytime, anywhere ā even offline. Perfect for commutes or when youāre on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app
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 & Computer Graphics. We have over one million books available in our catalogue for you to explore.