Page 1 of 1

Non xcode tuitorial

Posted: Sun Sep 04, 2016 5:50 pm
by blakat1033
My project is c++ based and I can't find a tutorial for chipmunk2d that doesnt focus on xcode.

Re: Non xcode tuitorial

Posted: Tue Sep 06, 2016 11:13 am
by slembcke
The demo app included with the Chipmunk source is plain C code, and shows you how to do a lot of different things. From basic object setup to advanced features like integration callbacks, collision handlers, and animated joints. The one thing it doesn't show you is how to link Chipmunk objects with your own sprites, since it relies directly on the debug drawing API. That part is simple enough though, give Chipmunk input (creating or updating physics objects), and then read back the position / rotation of the bodies or use the 3x2 transform matrices.

In the past, a lot of the tutorial content we made ourselves was focused on iOS, since we used to make money selling Objective-C bindings that made iOS dev easier. That said, the Obj-C API was a very direct translation of the C API. You should find many of the tutorials on the website to be very easy to follow for C/C++ projects too.