Fast and lightweight 2D rigid body physics library in C
Get the latest version or browse older versions.
Donate:
Hundreds of hours have been put into making Chipmunk what it is today. If Chipmunk has worked well for you, please consider donating to help support further development! We at Howling Moon software like to know our hard work is appreciated. About Us
Features:
- Designed with 2D video games in mind.
- Circle, convex polygon, and beveled line segment collision primitives.
- Multiple collision primitives can be attached to a single rigid body.
- Fast broad phase collision detection by using a spatial hash.
- Extremely fast impulse solving by utilizing Erin Catto's contact persistence algorithm.
- Support for collision callbacks based on user definable object types.
- Flexible collision detection system with layers, exclusion groups and event based callbacks.
- Supports point and segment (raycasting) queries to the collision detection system.
- Impulses applied to contact points can be retrieved after the impulse solver has finished for gameplay effects.
- Several kinds of joints and constraints available along with an API for easily adding new kinds of constraints.
- Lightweight C99 implementation with no external dependencies outside of the Std. C library.
- Many language bindings available.
- Simple, read the documentation and see!
- Unrestrictive MIT license.
- Makes you smarter, stronger and more attractive to the opposite gender!
Videos:
- Big list of Chipmunk videos on YouTube
- Sketches - An early video of Zany Doodle.
- The Machine (youtube)
- Domino pyramid (youtube)
- Domino smash (youtube)
- More
Support
The best way to get support is to visit the Chipmunk Forums. There are plenty of people around using Chipmunk on the just about every platform I've ever heard of. If you are working on a commercial project, Howling Moon Software is also available for contracting.
Logos:
Want to throw a logo on your splash screen to show how much you appreciate Chipmunk? Frank Condello was gracious enough to make a logo for me. A couple variations are available here.
Acknowledgments:
- Box2D:
- Erin Catto's Box2D code was the most useful reference that I used when creating Chipmunk. His contact persistence algorithm is the main reason why Chipmunk is so fast.
- Optimized Spatial Hashing for Collision Detection of Deformable Objects
- The best article I could find on spatial hashing. Their hash function seems to perform very well.
- Nonconvex Rigid Bodies with Stacking
- My previous implementation was based on this paper. I only implemented part of the algorithm before deciding that something simpler would be better suited for real time. I do use the split elastic solving pass in newer versions of Chipmunk however.
- Physics for Game Developers
- This book is a good reference for a lot of the math you'll need, but is far from a good reference on implementing a physics engine.
Logo by Frank Condello, Chipmunk sillouette by Kelvin Nishikawa
