Chipmunk release 4 comming soon.
-
- Posts: 46
- Joined: Tue Aug 21, 2007 10:30 am
- Contact:
Re: Chipmunk release 4 comming soon.
Per-body gravity is exactly why we wrote a simple cpSpaceStep replacement for our project. After looking at the source, we concluded that it would be too expensive to create a cpSpace for each different gravity vector we wanted. It's not that we're going to need it all of the time, but there are a few levels where we're counting on the player being able to shift the gravity of certain sets of objects.
-
- Posts: 7
- Joined: Wed Oct 03, 2007 11:56 am
- Contact:
Re: Chipmunk release 4 comming soon.
Will release 4 beef up the Ruby bindings support, such as adding some missing convenience methods (e.g., cpvforangle) and layers and groups for shapes?
Any ETA?
Dirk
Any ETA?
Dirk
- slembcke
- Site Admin
- Posts: 4166
- Joined: Tue Aug 14, 2007 7:13 pm
- Contact:
Re: Chipmunk release 4 comming soon.
Sorry I haven't been very responsive lately. I've been a bit distracted with things. I think that all the functionality changes/fixes are done. I just need to make sure that the documentation (and Ruby binding) is up to date, and make sure that all the projects/build scripts work.
It would take like an afternoon of concerted effort. I know that there are people eagerly awaiting, so I guess I could try shoot for Saturday afternoon.
It would take like an afternoon of concerted effort. I know that there are people eagerly awaiting, so I guess I could try shoot for Saturday afternoon.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
-
- Posts: 7
- Joined: Wed Oct 03, 2007 11:56 am
- Contact:
Re: Chipmunk release 4 comming soon.
He he he... yep, we are all anxious, but take your time... life is busy. We'll survive till you get to it.
Keep it fun.
Keep it fun.
-
- Posts: 13
- Joined: Tue Sep 25, 2007 9:24 am
- Contact:
Re: Chipmunk release 4 comming soon.
just wondering what the status on the new release is?
seems it was a while ago anything got posted here
seems it was a while ago anything got posted here
- slembcke
- Site Admin
- Posts: 4166
- Joined: Tue Aug 14, 2007 7:13 pm
- Contact:
Re: Chipmunk release 4 comming soon.
Well I updated the C documentation and Ruby extension today. Now I just need to update the Ruby Docs and make a release! Got to run out now, but I'll work on it more tonight I think.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
- slembcke
- Site Admin
- Posts: 4166
- Joined: Tue Aug 14, 2007 7:13 pm
- Contact:
Re: Chipmunk release 4 comming soon.
Ok, the changes are in. I just need to type up the release notes and bundle it up.
In the mean time if people could test the non-OS X build files. That would be handy.
In the mean time if people could test the non-OS X build files. That would be handy.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
-
- Posts: 13
- Joined: Tue Sep 25, 2007 9:24 am
- Contact:
Re: Chipmunk release 4 comming soon.
Nice
will there be some official cermony or at least a update on the homepage?
and, is there a changelog somewhere, im dying to check it out!
XD
will there be some official cermony or at least a update on the homepage?
and, is there a changelog somewhere, im dying to check it out!
XD
-
- Posts: 18
- Joined: Wed Sep 26, 2007 8:19 pm
- Contact:
Re: Chipmunk release 4 comming soon.
Michael Buckley, feel like discussing your simple gravity model? At least, where did you go about modifying Chipmunk to include one?
-
- Posts: 46
- Joined: Tue Aug 21, 2007 10:30 am
- Contact:
Re: Chipmunk release 4 comming soon.
Sure. So the first thing I should mention is that I did this with Chipmunk Release 3. I haven't checked to make sure it works in the latest release. The second thing that I should mention is that I did not have to modify Chipmunk in any way. I simply wrote a function which is mostly equivalent to cpSpaceStep (in fact, I used some of the source from cpSpaceStep) and called that instead. I'm not going to post the actual code, because there's a lot of other things going on in it, so I'm going to simplify it quite a bit, even to the point of using a straigt-up array instead of some other data structure.joshcryer wrote:Michael Buckley, feel like discussing your simple gravity model? At least, where did you go about modifying Chipmunk to include one?
So basically, the gist of it is to set up a class, I called it PhysicsLayer, which has as its member values a cpv to represent gravity, and an array of pointers to cpBodies which you want to fall under this gravity. You'll want each cpBody to be a member of at most one PhysicsLayer. I then have a class called PhysicsManager which has an array of physicsLayers, a float for the timestep (e.g. 1.0f/60.0f), and a float for the damping value (usually pow(1.0f, -timeStamp). In you also have a cpSpace with no gravity to which you add all of the bodies in all the PhysicsLayers. Then, in the PhysicsManager, you have a method called update (or whatever you want) which runs like this:
Code: Select all
// Assume size is the precomputed length of the array of PhysicsLayers layers.
for(int i = 0; i < size; ++i){
layers[i]->applyGravity(timeStep, damping);
}
cpSpaceStep(space, timeStep);
return;
Code: Select all
// Assume size is the precomputed length of the array of cpBodies bodies, and gravity is a cpv with the gravity value.
for(int i = 0; i < size; ++i){
cpBodyUpdateVelocity(bodies[i], gravity, damping, timeStep);
}
return;
Who is online
Users browsing this forum: No registered users and 6 guests