Chipmunk's Future (5.x, and beyond)

Official forum for the Chipmunk2D Physics Library.
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: Chipmunk's Future (5.x, and beyond)

Post by slembcke »

So I started a development branch for 6.0 a couple weeks ago and have been working to stabilize the new features. I think I've gotten all the major bugs fixed in the new AABB tree, and the new and improved contact graph and sleeping algorithm. Though neither have an API that really lets you access them at this point so it's not too exciting yet.

I think the AABB tree is fully working now and the efficiency is good. It uses temporal coherence pretty well, so when objects aren't moving it can just repeat the cached collision pairs from the last frame. It's also pretty efficient at rebuilding the cache and usually a fraction of the objects need to be rebuilt each frame. The performance of the spatial hash is still far better when dealing with large numbers of objects (like the Logo Smash demo), but for simulations with only a few hundred (probably every single iPhone game) the tree is much faster. I think in most cases the performance will be notably better.

The new sleeping algorithm builds a full contact graph that can be accessed outside of cpSpaceStep(). I don't have any APIs to access the new information yet, but it means that you will be able to able to query a body for it's constraints or collision pairs. Probably the neatest thing you will be able to do with this is to easily and efficiently test if a body is grounded (if it's touching the ground), and I plan on writing a function to do that. The new sleeping algorithm also completely removes sleeping constraints and collision pairs from being further processed, though I wouldn't expect it to make a measurable difference unless you had a simulation with thousands of sleeping objects and constraints.

If you want to give it a look, you can check out the code with subversion at:
http://chipmunk-physics.googlecode.com/ ... pmunk-6.x/

Just keep in mind that it's still an early development version and I've heavily refactored, removed or made private a number of functions and data structures and I haven't replaced them with maintainable APIs yet.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
dieterweb
Posts: 176
Joined: Fri Feb 27, 2009 7:12 am
Location: Germany
Contact:

Re: Chipmunk's Future (5.x, and beyond)

Post by dieterweb »

Sounds great!

I will give it a try when I find some spare time.
Visit our game Blog: [url]http://zombiesmash.gamedrs.com[/url] or follow us on twitter: [url]http://twitter.com/zombiesmash[/url]
aisman
Posts: 145
Joined: Tue Mar 04, 2008 2:21 am
Contact:

Re: Chipmunk's Future (5.x, and beyond)

Post by aisman »

slembcke wrote:If you want to give it a look, you can check out the code with subversion at:
http://chipmunk-physics.googlecode.com/ ... pmunk-6.x/

Just keep in mind that it's still an early development version and I've heavily refactored, removed or made private a number of functions and data structures and I haven't replaced them with maintainable APIs yet.
Hello slembke,

Make it sense to give 6.x a try?
(What I mean is: what are the improvements on this early version comparing with the latest stable version 5.3.4?)
Chipmunk4PB: The fastest way to write games together with PureBasic and the Chipmunk physics engine.
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: Chipmunk's Future (5.x, and beyond)

Post by slembcke »

I've implemented a second broadphase spatial index, an AABB tree like the one that Bullet uses. The tree is a nice complement to the spatial hash, it doesn't have the same issue with large differences in size, and it's faster with lower numbers of objects. I've also reimplemented the sleeping algorithm to build a persistent contact graph. This would let you check grounding or other potentially useful stuff.

The problem is that there is no new APIs to work with the AABB tree or the contact graph, and adding the support for the AABB tree meant that I had to make API changes to support it. So at the moment it isn't particularly useful unless you really want to get your hands dirty digging into the Chipmunk code.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
aisman
Posts: 145
Joined: Tue Mar 04, 2008 2:21 am
Contact:

Re: Chipmunk's Future (5.x, and beyond)

Post by aisman »

Have you a proposal for a first release of 6.x?
Chipmunk4PB: The fastest way to write games together with PureBasic and the Chipmunk physics engine.
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: Chipmunk's Future (5.x, and beyond)

Post by slembcke »

Not yet. The big new features mostly work and I've done a ton of refactoring on the code, I just need to come up with good APIs to work with it now. I've not had a lot of time to work on Chipmunk for a few weeks now, trying to juggle two contracts at once. Hopefully that improves soon now that one of them is completed.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
sumitkhatri
Posts: 9
Joined: Sat Feb 19, 2011 6:02 pm
Contact:

Re: Chipmunk's Future (5.x, and beyond)

Post by sumitkhatri »

Can we expect 6.0 in very near future.
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: Chipmunk's Future (5.x, and beyond)

Post by slembcke »

Chipmunk 6 is pretty much done except for the documentation which I've only just started.

You can check it out from subversion here:
http://chipmunk-physics.googlecode.com/ ... pmunk-6.x/
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
aisman
Posts: 145
Joined: Tue Mar 04, 2008 2:21 am
Contact:

Re: Chipmunk's Future (5.x, and beyond)

Post by aisman »

slembcke wrote:Chipmunk 6 is pretty much done except for the documentation which I've only just started.
Fine. So we can start to write ports and wrappers about Chipmunk 6.0.0. I am right? ;-)
Chipmunk4PB: The fastest way to write games together with PureBasic and the Chipmunk physics engine.
Beoran
Posts: 19
Joined: Sat Apr 12, 2008 2:02 pm
Contact:

Re: Chipmunk's Future (5.x, and beyond)

Post by Beoran »

I've updated my Ruby bindings to chipmunk 5.3.4 (more on that in another posting). For bindings to chipmunk 6.x, I would like to keep compiling from the same source. It would be nice if in the chipmunk.h header some version constants were defined, like say

Code: Select all

#define CHIPMUNK_VERSION_MAJOR 6 
#define CHIPMUNK_VERSION_MINOR 0 
#define CHIPMUNK_VERSION_TINY    0 
#define CHIPMUNK_VERSION_NUMBER 600 
#define CHIPMUNK_VERSION_STRING "6.0.0"
to be able to do conditional compilation around the incompatible changes.

Thanks for your consideration,

B.
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 9 guests