Page 1 of 1

Chipmunk C++ wrapper

PostPosted: Sun Sep 09, 2012 10:33 am
by Marwes
Hello!

I have been working a wrapper for chipmunk for the last few weeks and I believe it is finally in a state where I can share it with others. It is still a work in progress though so bugs are likely and not every function is exported (most are though, see update).

The code is generated by a lua script that parses all the header files so any updates to chipmunk that does not break the API greatly should be possible to generate wrapper files for (currently only tested on 6.1.1though).

You can find the source here https://github.com/Marwes/CppChipmunk.

TODO:
Clean up the generator script to make it easier to understand.

Please let me know if you have any suggestions or spot/experience any bugs.

Update:
Should have updated this post a while back to add that 'all' functions should now be exported (let me know if you spot any that are being missed but I think they should all be there).
Comments are in as well.
Added an option to not generate the functions that uses std::function as well as move constructors (look in the build.lua file)

Re: Chipmunk C++ wrapper

PostPosted: Tue Sep 11, 2012 10:41 am
by slembcke
Nice. :) I'll add it to the Bindings and Ports page when I get a chance. There have been a couple others over the years, but none have been quite complete, and they don't always stay up to date.

http://chipmunk-physics.net/bindingsAndPorts.php

Re: Chipmunk C++ wrapper

PostPosted: Wed Sep 26, 2012 5:05 pm
by jhasse
Wow looks really good! It's a pity you didn't create it 6 months ago ;)

I created another wrapper back then (and still update it): https://github.com/jhasse/chipmunkpp

Do you already use your wrapper in any game? Are you using Garbage Collection?

Re: Chipmunk C++ wrapper

PostPosted: Tue Oct 02, 2012 2:48 pm
by Marwes
jhasse wrote:Wow looks really good! It's a pity you didn't create it 6 months ago ;)

I created another wrapper back then (and still update it): https://github.com/jhasse/chipmunkpp

Do you already use your wrapper in any game? Are you using Garbage Collection?


Bit of a late answer here but moving to another country takes up most of my time (who would have thought that?).

I'm using it myself currently on a game I'm making in my spare time but I am only using it for basic stuff so far which means there may be some bugs lurking that I haven't noticed. I would like to set up some unit testing in the coming weeks when I get some time.

I'm not using any garbage collection/reference counting, if that is needed I figure that it is better if the user supplies that.