How to create destructable landscape?

My goal is to create something similiar to what the game worms has. if you know the game
worms you know my goal :slight_smile: Basically a bazooka shot would make a hole in the ground.

I dont know how to do it by code, but in theory you build your game level dot by dot. And then when for example a bomb explode, you calculate what dots are in the radius of the explosion and delete them.

For performance i think this is something to look into.
link text

After I quickly looked trough this article about the game worms

link text

It seems like the 2D version of the worms games, they used a bitmap image to represent the map. And then removed pixels of it from explosions and so on.

Also here is the source code for the game OpenLiero, It is in C++ but you might get some ideas how they managed things. link text

Hope this give you a push in the right direction :smiley:

ok, so my last answer i deleted cause it was not enough explanation. i can see 2 options in my mind atm.

or you procedurally regenerate the mesh ,edit it on the fly, but this requires u playing around with triangle and vertices and knowledge on how mesh is generated in first place .

second option, prob easiest but most heavy on resource is to have chunks of terrains as a solid , if that block of area gets hit by explosion, switch out that prefab with a terrain that is already in pieces and start deactivation the top layers based on the size of the explosion.