Chipmunk is a fast and lightweight 2D rigid body physics library written in C.
December 2011: Chipmunk 6.0.3 Released!
Download Latest Version and Demos
Download from GitHub
Download Latest Version and Demos
or
Download from GitHub
Games using Chipmunk include:
Chipmunk Pro
Chipmunk Pro can save weeks of development time and starts at $89, with flexible licensing options for organizations of any size. Learn how Chipmunk Pro can help you.
Also, by purchasing Chipmunk Pro, you help us to afford the time that we spend improving Chipmunk.
Features
- Designed specifically for 2D video games.
- 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 bounding box tree with great temporal coherence or a spatial hash.
- Extremely fast impulse solving by utilizing Erin Catto's contact persistence algorithm.
- Supports sleeping objects that have come to rest to reduce the CPU load.
- Support for collision event callbacks based on user definable object types types.
- Flexible collision filtering system with layers, exclusion groups and callbacks.
- Can be used to create all sorts of effects like one way platforms or buoyancy areas. (Examples included)
- Supports point, segment (raycasting), shape and bounding box queries to the collision detection system.
- Collision forces can be retrieved for gameplay effects.
- Large variety of joints - easily make vehicles, ragdolls, and more
- Joint callbacks.
- Can be used to easily implement breakable or animated joints. (Examples included)
- Maintains a contact graph of all colliding objects.
- 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
Community
Chipmunk has an active community of thousands of users making games for many different platforms.
With Chipmunk's large collection of examples, you'll be developing games faster and more easily than ever before. Snap! Physics is one completed game example that uses our Objective Chipmunk binding.
With Chipmunk's large collection of examples, you'll be developing games faster and more easily than ever before. Snap! Physics is one completed game example that uses our Objective Chipmunk binding.
Videos:
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:
- Erin Catto:
- Optimized Spatial Hashing for Collision Detection of Deformable Objects
- Nonconvex Rigid Bodies with Stacking
- Physics for Game Developers
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.
The best article I could find on spatial hashing. Their hash function seems to perform very well.
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.
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

