Youtube:
| Get the Video Plugins |
I made a demo for Chipmunk Pro's auto-geometry module. The auto-geometry works by using a sampling function, so you can make it trace an image mask, procedural noise such as perlin noise, or any other function or combination you can think of.
For this demo I stored the terrain density in a point cloud (a list of fuzzy dots). This uses very little memory and doesn't have any bounds. While you can't scroll in this demo, if the same technique was used in a game you could keep digging in any direction and never hit any limits or edges.
The demo also breaks the terrain up into tiles. Whenever a chunk is taken out of the terrain, it only updates the tiles that it overlaps. This allows it to run very fast, requiring only 0.2 milliseconds on a Core 2 Duo machine for each chunk of terrain removed. (Haven't done performance testing on iOS yet, but expect to multiply that number by 10x)
I posted the source to the ChipmunkPro downloads directory. If you bought Objective-Chipmunk/Chipmunk Pro, we sent you an email with login info a couple weeks ago.
http://files.slembcke.net/chipmunk/release/chipmunkPro/DeformableChipmunk.tgz
The auto-geometry API is still experimental and changing, but I figured that people that bought Chipmunk Pro would appreciate early access. The plan is to have the auto-geometry stuff officially done by the end of the summer.