Chipmunk Physics

  • Chipmunk Pro
  • Downloads
  • Store
  • Documentation
  • Forum
  • Games
  • Contact
About Chipmunk Pro

Chipmunk Pro is a cross-platform set of additions to Chipmunk that makes your game development easier with a growing set of tools designed to get you past the most tedious and time consuming parts of game development. Hundreds of shipping games have chosen Chipmunk because of the high quality, speed, and accuracy of its 2D physics simulations.

Cross Platform and Optimized

Mobile development offers unique performance challenges, and Chipmunk Pro is specifically optimized for speed by offering a multi-threaded and vectorized solver. The Pro edition offers an alternative cpSpace type, cpHastySpace, which will automatically use the ARM NEON vector coprocessor available to most Android and iOS mobile devices. Even if you don't need the extra performance, it will help save your player's batteries. cpHastySpace also allows you to enable extra threads for the solver to use as well.

Chipmunk is widely used for 2D physics rich games on Mac, Windows, Linux, Android, iOS, and game consoles. If you have a C or C++ compiler, you can use Chipmunk Pro. Some functionality is platform specific, such as the Objective-Chipmunk wrapper (iOS, Mac OS X, or an alternative Obj-C runtime), the NEON optimizations (requires an ARM CPU with a NEON coprocessor), or multi-threading (currently requires pthread support).

Autogeometry

Level design and asset creation is a time consuming portion of game development, and Chipmunk Pro can significantly aid in creating your physics shapes. Chipmunk Pro's automatic geometry generation can create fitted collision geometry from images. Gone are the days of typing coordinates to generate collision shapes. The Autogeometry generation can create the physics shape for the terrain of your game from an image in milliseconds, allowing rapid iteration with just your graphics tools. This geometry can even be generated on the fly at runtime providing for spectacular techniques, such as deformable objects and terrain (Demo video on youtube). See Scott's walkthrough of collision shape generation from images.

Accelerate iOS Development

For iOS development, Chipmunk Pro includes "Objective-Chipmunk", an Objective-C wrapper around all Chipmunk functionality. This provides greatly simplified memory management (especially when combined with automatic reference counting), an object oriented syntax, convenience classes for multi-touch input, and more. This speeds your development and reduces debugging. Your time is valuable!

Indie Friendly

Chipmunk offers AAA-quality physics features and performance, but it doesn't come with a AAA price. With the popular Chipmunk Indie license, you can have access to the C and Objective-C APIs (including ARC, object management, and utility classes!) at a very Indie-friendly price. Whichever license you choose, you can use Chipmunk Pro in as many games as you want!

Free Trial and Example Code

A free trial version of Chipmunk Pro for iPhone is available on the downloads page. It's feature complete, but cannot be used in a released game. You can also check out all of the example code on the documentation page. Once you've purchased Chipmunk Pro, we'll email you a username/password to download the full version.

When Do You Need to Buy?

If you are building an iOS application, the provided trial library will create a dialog informing the user it's a trial version, but is otherwise unrestricted. To remove this window and be allowed to distribute the game, you'll need to purchase Chipmunk Pro. After buying it, you get full access to source code and can use it on as many projects as you want.

Which edition is right for you?
Chipmunk Chipmunk Indie Chipmunk Pro Chipmunk Studio Chipmunk Enterprise
Works on iOS, Android, PC, Mac, .... ✓ Obj-C only ✓ ✓ ✓
Loads of example code ✓ ✓ ✓ ✓ ✓
Source Included
It can be frustrating to use a library when you can't see how it ticks. Chipmunk started as an open source project and will always stay that way. We want to give our Chipmunk Pro customers the same full access to the source they get with the C API. Additionally, you'll get access to the Chipmunk Pro Git repository for quicker turnaround on bug fixes between released versions.
C only C only Full Full Full
Free To Try ✓ ✓ ✓ ✓ ✓
iPhone specific example code ✓ ✓ ✓ ✓
Objective-Chipmunk ✓ ✓ ✓ ✓
Native Objective-C memory management
Use regular Objective-C retain/release on Chipmunk objects instead of trying to enforce single ownership or more complicated manual management. Put Chipmunk objects into NSArrays or NSDictionaries without needing to awkwardly wrap them using an NSValue.
✓ ✓ ✓ ✓
Supports automatic reference counting
Xcode 4.2 and up supports ARC (automatic reference counting) so you don't need to manage your memory by hand. Save time and make fewer bugs. Objective-Chipmunk 6.0.3 and up has support for ARC.
✓ ✓ ✓ ✓
Cocoa Touch API Helpers
Seamlessly convert Chipmunk vectors and CGPoints, get a CGAffineTransform for a ChipmunkBody and more.
✓ ✓ ✓ ✓
Multi-touch Physics
Easily support multi-touch physics interaction using the ChipmunkMultiGrab class.
✓ ✓ ✓ ✓
Chipmunk Object Protocol
The Chipmunk Object Protocol facilitates the easy addition of Chipmunk bodies, shapes and joints to the space. It also lets you easily create compound objects and keep your physics code organized.
✓ ✓ ✓ ✓
Optimized for ARM NEON (iOS, Android, etc)
NEON is the SIMD instruction set for the ARMv7 CPUs found in most iOS and Android devices. Chipmunk Pro contains NEON specific optimizations that can make your simulations run up to 40% faster. Most simulations should see at least a 15-20% speedup.
✓ ✓ ✓
Auto Geometry
Chipmunk Pro's Auto Geometry is very flexible and can create collision shapes from images or procedural data. Use it at runtime or offline as part of your build process. Use it to generate terrain from your level images. Use it to generate collision shapes for your sprites. Use it to provide high performance deformable terrain.
✓ ✓ ✓
No Logo Requirement
With Chipmunk Indie you just need to show the Chipmunk logo somewhere (splash screen, about box) in your game. Nothing fancy. We are trying to help grow the community with the lower priced Chipmunk Indie. It's helpful to get a little extra exposure.
✓ ✓ ✓ ✓
No Income Limits
If your organization's gross yearly profit exceeds $100,000 USD, you are required to purchase the Studio or Enterprise edition.
✓ ✓ ✓
Included Support Incidents
A technical support incident includes direct access to Chipmunk lead developers for help with your specific Chipmunk Physics related issues. Incidents are handled over email to admin (at) howlingmoonsoftware.com. For expedited handling, mention "support incident" in the message subject. Common incidents include help with optimizations, help with custom joints or behaviors, and low level physics expertise.
1 5
Free from MIT License
The C-API of Chipmunk is bound under the MIT License, which requires attribution. Enterprise edition customers are exempt from the MIT license requirements.
✓
See our detailed license terms.
Performance

Don't compromise your game design by with sluggish physics performance. Chipmunk is designed for speed and nearly every algorithm in Chipmunk has been profiled, benchmarked, and optimized to give you the maximum performance possible. This is especially important on mobile devices with limited CPU power where every cycle counts.

Chipmunk Pro features platform specific optimizations. Currently this includes an ARM NEON optimized solver that can speed up most Chipmunk simulations by 20-40%. If there is demand, we would also be interested in implementing SIMD optimizations for other platforms such as x86 or PPC. We also have a working multithreaded solver available in the Git repository that will be part of 6.0.4 and are working on multithreaded collision detection as well for even more performance improvements.

Benchmarks:

So how much faster is Chipmunk Pro? Let's run some benchmarks to find out! The benchmarks are all included with Chipmunk and can be run by passing the -bench argument to the demo application. An iPhone benchmarking app can be found as part of the Chipmunk Pro Xcode project. You can also view the first couple seconds of each benchmark to see what it was doing by clicking the icons in the chart below.

We also get asked quite often how Chipmunk's performance compares to Box2D, so we included that in the comparison as well. Chipmunk's solver was originally based on Box2D's, but our implementations have diverged over several years as features have been added and the performance has been extensively tuned. Despite requiring a higher iteration count to achieve the same stability, Chipmunk's performance is very competitive, easily besting Box2D's performance in every single test. The optimizations in Chipmunk Pro further boost that beyond double in many tests. Chipmunk's broadphase collision detectino is very fast. The "bouncy" demos stress test the collision detection an spend minimal time in the solver. If you are using Box2D only for it's collision detection and ignoring the physics, you might want to consider switching. Chipmunk offers a richer collision API, much higher performance, and doesn't requie you to scale all of your units in order get acceptable performance or accuracy.

All benchmarks were run on a iPhone 4S using the release compile settings for each library. Versions used were Chipmunk 6.0.3, Chipmunk Pro 6.0.4 from Git (with the NEON and multi-threaded solver enabled), and Box2D 2.2. Chipmunk 6.0.3 was used as the baseline comparison for Chipmunk Pro and Box2D. The times in the chart below are measured in milliseconds. Sleeping was disabled in all libraries to compare just the solver and collision detection performance. (CPU usage of sleeping objects is very minimal) Continuous collision detection was disabled in Box2D as it incurs a fairly large overhead. The scale used with Box2D was also tuned to give it the best performance. Scaling the units is unnecessary with Chipmunk. Chipmunk was using 10 velocity/position iterations while Box2D was using 10 velocity iterations and 3 position iterations. All simulations were run at 60Hz for 1000 steps. Only the simulation is included in the time trials, no rendering is performed.

Chipmunk Chipmunk Pro Box2D
SimpleTerrainCircles_1000
17711.68 10875.91 27333.87
SimpleTerrainCircles_500
7893.71 4903.25 9663.08
SimpleTerrainCircles_100
1318.14 1102.51 1682.14
SimpleTerrainBoxes_1000
34794.06 24841.11 51386.70
SimpleTerrainBoxes_500
11701.03 7898.51 15077.12
SimpleTerrainBoxes_100
2100.96 1732.54 2437.21
SimpleTerrainHexagons_1000
29434.59 21952.09 34609.11
SimpleTerrainHexagons_500
13269.92 9736.09 14513.95
SimpleTerrainHexagons_100
2307.68 1957.62 2537.53
SimpleTerrainVCircles_200
2967.15 2084.33 3338.19
SimpleTerrainVBoxes_200
4408.18 3121.41 5262.79
SimpleTerrainVHexagons_200
4947.09 3850.76 5148.81
ComplexTerrainCircles_1000
18831.02 12337.92 29682.58
ComplexTerrainHexagons_1000
35205.27 26115.87 46755.10
BouncyTerrainCircles_500
1843.89 1734.72 8667.23
BouncyTerrainHexagons_500
2678.24 2579.44 9998.63
NoCollide 50.88 50.46 590.74
Fact: Using Chipmunk Physics makes you feel better!
Howling Moon Software © 2013  |  Legal Stuff