C++?
- slembcke
- Site Admin
- Posts: 4166
- Joined: Tue Aug 14, 2007 7:13 pm
- Contact:
Re: C++?
Not really. I actually specifically avoided C++ as I dislike the language in many ways. (I'll leave that rant for another day) C integrates well with just about any other language in existence. Many of those languages being ones I want to write games in. I'm willing to put up with C to make a well optimized library that I can call from a language of my choice.
Somebody did write a C++ wrapper: http://github.com/Irwin1138/ChipmunkWrapper
If that one is not to your liking, it wouldn't really be hard to write a new one.
Somebody did write a C++ wrapper: http://github.com/Irwin1138/ChipmunkWrapper
If that one is not to your liking, it wouldn't really be hard to write a new one.
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/
- Tam Toucan
- Posts: 141
- Joined: Tue Jun 23, 2009 4:26 pm
- Contact:
Re: C++?
+1
I'm a C++ user, but Chipmunk is a perfect example of an easy to use, well structured API. It's easy to compile, integrate with and read. C++ would just reduce this for no gain. As Scot says just sit a wrapper around it.
In my code I don't bother with a wrapper, all Chipmunk stuff is behind 3 classes; the world that runs the physics (has the space and calls step), items that have all the joints, bodies and shapes (and provides position/orientation/etc to the actual item for drawing), and a factory to build items from a simple text file definition. The rest of the code knows nothing about Chipmunk so a wrapper is of no benefit.
I'm a C++ user, but Chipmunk is a perfect example of an easy to use, well structured API. It's easy to compile, integrate with and read. C++ would just reduce this for no gain. As Scot says just sit a wrapper around it.
In my code I don't bother with a wrapper, all Chipmunk stuff is behind 3 classes; the world that runs the physics (has the space and calls step), items that have all the joints, bodies and shapes (and provides position/orientation/etc to the actual item for drawing), and a factory to build items from a simple text file definition. The rest of the code knows nothing about Chipmunk so a wrapper is of no benefit.
Who is online
Users browsing this forum: No registered users and 21 guests