Deformable Terrain in C

Official forum for the Chipmunk2D Physics Library.
Post Reply
Freeman
Posts: 2
Joined: Mon Feb 18, 2013 1:06 pm
Contact:

Deformable Terrain in C

Post by Freeman »

Hi,

I've been looking at the example code provided for autogeometry and noticed that the cpMarch* stuff is only implemented in the Objective-C code. I know this example may be slightly out-dated and was wondering if this functionality has migrated to the C API in Chipmunk Pro yet?

Basically I would like to use Chipmunk Pro to handle the realtime terrain deformation in my game but the game
is being written in C and therefore having a plain C alternative would be awesome :)

P.S. I have searched the forums and found it mentioned http://chipmunk-physics.net/forum/viewt ... ain#p10092 that it might be on the cards but nothing else.
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: Deformable Terrain in C

Post by slembcke »

So the geometry generation (cpMarch.h) and geometry handling (cpPolyline.h) code is all plain C. The part that's not, which is relevant to realtime deformable terrain is the ChipmunkTileCache class. It's the part that manages the changed geometry in performance friendly sized chunks. There are also Objective-C utility classes for working with Apple's image APIs if you want to process bitmap data.

The Chipmunk Geometry Tracer example code shows you how to sample bitmap data from plain C. It really just involves making a glorified "getpixel" function callback and pointing it at some bitmap data that you've loaded.

I've picked up a Nexus 7 to start porting some of the demo projects to Android. I'd love to have a working version of the Space Patrol demo working on the 7 to show off at GDC. I can't make any promises, but I am making it a priority. It depends on how much other client work we end up getting.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Freeman
Posts: 2
Joined: Mon Feb 18, 2013 1:06 pm
Contact:

Re: Deformable Terrain in C

Post by Freeman »

That's awesome to hear and thank you for the quick reply. I will focus terrain generation and geometry for now (or any of the other mountains of work still required) in that case until the real time deformation features become available.
Post Reply

Who is online

Users browsing this forum: No registered users and 28 guests