Search icon CANCEL
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Game Physics Cookbook

You're reading from  Game Physics Cookbook

Product type Book
Published in Mar 2017
Publisher Packt
ISBN-13 9781787123663
Pages 480 pages
Edition 1st Edition
Languages
Concepts
Author (1):
Gabor Szauer Gabor Szauer
Profile icon Gabor Szauer

Table of Contents (27) Chapters

Game Physics Cookbook
Credits
About the Author
Acknowledgements
About the Reviewer
Acknowledgements
www.PacktPub.com
Customer Feedback
Preface
1. Vectors 2. Matrices 3. Matrix Transformations 4. 2D Primitive Shapes 5. 2D Collisions 6. 2D Optimizations 7. 3D Primitive Shapes 8. 3D Point Tests 9. 3D Shape Intersections 10. 3D Line Intersections 11. Triangles and Meshes 12. Models and Scenes 13. Camera and Frustum 14. Constraint Solving 15. Manifolds and Impulses 16. Springs and Joints Advanced Topics Index

Open source physics engines


One of the best ways to learn is to examine the existing technology. There are a large number of open source physics engines that we can study. I'm only listing open source engines, which means that closed source SDKs, such as Havok or PhysX, are left out of this list. Out of all the physics engines listed, you really need to go through the Box2D Lite source code.

Box2D Lite

This is, by far, the must-read physics engine! The project is small and easy to nagivate. The entire project consists of six .cpp and six .h files. Even though this is a 2D engine, it can easily be extended for 3D support. To download and have a look at Box2D Lite visit http://box2d.org/files/GDC2006/Box2D_Lite.zip

The most important thing about this engine is the arbiter implementation. Box2D Lite provides a full arbiter implementation. The engine uses a similar impulse solver to the one that we covered in this book; this makes the arbiter provided with Box2D Lite easy to use with our engine. There is a GDC presentation about the project available at http://box2d.org/files/GDC2006/GDC2006_Catto_Erin_PhysicsTutorial.ppt

Box2D

Box2D is a 2D physics engine written in C++ that is developed by Erin Catto. Box2D powers some of the most popular 2D mobile games. This engine has been ported to many other languages, such as C#, Java, Java script, and Action script. It's worth reading through the source of Box2D Lite before getting into the advanced features of Box2D.

https://github.com/erincatto/Box2D

Dyn4j

The dyn4j is a 2D collision detection and physics engine written in Java. The engine is robust and provides a feature set comparable to Box2D. What really sets this engine apart is the accompanying website. The dyn4j blog (http://www.dyn4j.org) provides clear and concise examples and tutorials for many advanced physics topics.

Bullet

The Bullet physics engine is probably the most popular open source 3D physics engine out there. The engine implements many cutting-edge algorithms and techniques. Some of the more advanced features of the engine are hard to find documentation on; they are only described in academic papers. Bullet is large and feature rich, it is used in everything from games to robotics. http://bulletphysics.org/wordpress

ODE

The Open Dynamics Engine (ODE) is a high-performance physics library written in C++. ODE is an older engine, which receives infrequent updates. The source code for the engine is well written and easy to understand. ODE has been used to ship several AAA commercial games as well as robotics. http://www.ode.org

JigLib

JigLib is an experimental physics engine that has a very clean, well-organized, and easy-to-follow source code. The engine has been ported to C#, Java, Java script, Action script, and other languages. The engine is stable; it runs well even on older hardware.

http://www.rowlhouse.co.uk/jiglib

React 3D

React3D is a C++ physics engine being developed by Daniel Chappuis. The source code of the engine is well organized, easy to follow and extremely well commented. The comments in the source code of this engine are better than some of the online tutorials. The engine is feature rich and runs very fast. http://www.reactphysics3d.com

Qu3e

The qu3e is a simple C++ physics engine being developed by Randy Gaul. The engine aims to strip a modern physics engine down to its minimal code. Only the cube primitive is supported, but many advanced features are implemented. The engine is a great example of the minimum code needed for modern physics simulation.https://github.com/RandyGaul/qu3e

Cyclone Physics

Cyclone Physics is a 3D physics engine developed by Ian Millington for his book, Game Physics Engine Development. More information about the book is provided later in this chapter. https://github.com/idmillington/cyclone-physics

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime}