How to implement a Worms style destructible terrain in XNA?

Spoonman picture Spoonman · Jan 18, 2010 · Viewed 16.9k times · Source

I want to prototype an idea for a game I have. The idea for this game is that the player will dig through the ground, creating tunnels and finding treasure.

I'm looking to create 'worms style' terrain, with collision detection for the player wandering and jumping around the tunnels. Examples of this type of dynamic terrain can be seen in these pictures. Example 1 Example 2

My question is how is the best way to implement this type of destructible terrain? I am using XNA game studio.

Answer

keyboardP picture keyboardP · Jan 18, 2010

There's some nice code at the bottom of the this thread. Also, this is a great step-by-step tutorial on achieving a destructible terrain.

EDIT - The original link for the second tutorial was broken, so I've linked to an archived version of it.