Page 1 of 1

"Classic" Ruby Bindings for Chimunk 5.0.0

Posted: Mon Jan 18, 2010 5:11 am
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. :)

Re: "Classic" Ruby Bindings for Chimunk 5.0.0

Posted: Mon Jan 18, 2010 9:49 am
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.

Re: "Classic" Ruby Bindings for Chimunk 5.0.0

Posted: Tue Jan 19, 2010 1:47 am
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.

Re: "Classic" Ruby Bindings for Chimunk 5.0.0

Posted: Tue Jan 19, 2010 9:19 am
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?

Re: "Classic" Ruby Bindings for Chimunk 5.0.0

Posted: Tue Jan 19, 2010 9:53 am
by slembcke
Yeah. Those parameters weren't supposed to be there. :oops:

Re: "Classic" Ruby Bindings for Chimunk 5.0.0

Posted: Wed Jan 20, 2010 3:07 am
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... >_<

Re: "Classic" Ruby Bindings for Chimunk 5.0.0

Posted: Wed Jan 20, 2010 3:09 am
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!

Re: "Classic" Ruby Bindings for Chimunk 5.0.0

Posted: Tue Jan 26, 2010 12:36 pm
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.

Re: "Classic" Ruby Bindings for Chimunk 5.0.0

Posted: Fri Feb 26, 2010 8:00 pm
by RavensKrag
Is there currently a gem for this, or do you have to compile from source?