Page 1 of 1

C++?

Posted: Fri Dec 04, 2009 6:04 pm
by aleph
It may be only me, but I would like to see the engine rewritten in C++. It has and underlying OO design anyway and it would make life so much easier. Are there any plans/enthusiasm for doing this?

Re: C++?

Posted: Fri Dec 04, 2009 7:31 pm
by slembcke
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.

Re: C++?

Posted: Sat Dec 05, 2009 3:14 am
by Tam Toucan
+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.

Re: C++?

Posted: Sat Dec 26, 2009 9:56 am
by atis
slembcke, I agree with your sentiments about C++. Chipmunk being written in plain C is what makes it so great (among all the other things).