"Classic" Ruby Bindings for Chimunk 5.0.0

Official forum for the Chipmunk2D Physics Library.
Post Reply
Beoran
Posts: 19
Joined: Sat Apr 12, 2008 2:02 pm
Contact:

"Classic" Ruby Bindings for Chimunk 5.0.0

Post by Beoran »

First of all, thanks for the new version of Chipmunk!

Together with Banisterfield, I'm currently maintaining classical style bindings MRI Ruby 1.8.x and 1.9.x for Chipmunk 4.1.0
( see http://github.com/beoran/chipmunk#readme ) . I know about the FFI bindings, but I think the classic style bindings
also have their merit (performance, mostly), so I'd like to keep them up-to-date.

If you like, and if it would help you, I'd like to help you develop and maintain similar bindings for Chipmunk 5.0.0, as I see
that they're not completely finished yet in the SVN repository. Furthermore, I think I want to implement them just like
it was done in 4.1.0, as a sytandalone extension that requires no external DLL, for convenience reasons. Also, we can put up
the bindings on on rubyforge and gemcutter for you.

So if you want us to do it, just say the word! I'll probably already get started. :)
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: "Classic" Ruby Bindings for Chimunk 5.0.0

Post by slembcke »

This would actually be pretty helpful. Lately I haven't really had the time to keep the bindings up to date, and we haven't started any new Ruby game projects recently to use any of the new features. I also never really made a real build system or any example code for it.

Are you just going to fork the code out of the current SVN? When you get yours off the ground I should probably remove it from my SVN repository and just point to your project and the FFI version then. No sense in having a less up to date version be the most visible.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Beoran
Posts: 19
Joined: Sat Apr 12, 2008 2:02 pm
Contact:

Re: "Classic" Ruby Bindings for Chimunk 5.0.0

Post by Beoran »

OK, I'm on it! :) I just forked your code, and I'll take it from there. I'll also try to translate the examples, and have a Rakefile based build system. I'll let you know here when it's up and running. It may take me some time, though.
Beoran
Posts: 19
Joined: Sat Apr 12, 2008 2:02 pm
Contact:

Re: "Classic" Ruby Bindings for Chimunk 5.0.0

Post by Beoran »

OK, I have some working code up here:

http://github.com/beoran/chipmunk/tree/5.0.0

I've unbundled Chipmunk, so it links to the C chipmunk library installed on your system, which should make it easier for use on debian, etc, or at least, I hope.

I hit a slight snag, though: I found that the api for cpSpaceSetDefaultCollisionHandler has changed between 5.0.0 and your SVN version. I just went forward with the old API, filling in 0 for the a and b collision type. I hope that that's OK. If you plant upgrade to the new API, perhaps it would make sense to have a new release for that?
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: "Classic" Ruby Bindings for Chimunk 5.0.0

Post by slembcke »

Yeah. Those parameters weren't supposed to be there. :oops:
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Beoran
Posts: 19
Joined: Sat Apr 12, 2008 2:02 pm
Contact:

Re: "Classic" Ruby Bindings for Chimunk 5.0.0

Post by Beoran »

I see. If that's the case, then please consider releasing a version 5.1.0 (or is it 6.0.0 as the API changes?) with the correct API, and with some other bugfixes, such as some memory leaks reported earlier? I feel like this could get nasty easily when Linux distros like Debian would start packaging the current 5.0.0 version... >_<
Beoran
Posts: 19
Joined: Sat Apr 12, 2008 2:02 pm
Contact:

Re: "Classic" Ruby Bindings for Chimunk 5.0.0

Post by Beoran »

Whoops, I didn't see the message in tghe foruim. 5.1.0 is out! :) OK, I'll update my bindings to that release!
Beoran
Posts: 19
Joined: Sat Apr 12, 2008 2:02 pm
Contact:

Re: "Classic" Ruby Bindings for Chimunk 5.0.0

Post by Beoran »

OK, I have a working version of the bindings for 5.1.0 here:

http://github.com/beoran/chipmunk

There are no binaries for OSX or Windows yet, as I only have Linux, and I haven't widely tested it, but it passes the specs, and my old app that uses it works with it. So please try it out help me compile it for other platforms.
RavensKrag
Posts: 1
Joined: Fri Feb 26, 2010 7:56 pm
Contact:

Re: "Classic" Ruby Bindings for Chimunk 5.0.0

Post by RavensKrag »

Is there currently a gem for this, or do you have to compile from source?
Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests