I’m looking for some guides or tutorials to make a 2D map with destruction, but I didn’t found nothing.
Anyone know how do I can create anything just like the image below ?
I want to destroy a part of my plataform where my objects / shots collide, but I will have a custom background behind, which I need to show after some parts being destroyed.
Looks like you want to recreate terrain from Worms.
Easiest way is to keep a pixel mask of the entire terrain and update a terrain texture after explosions. To improve performance you would have to split up the texture into smaller pieces so that texture uploads to video memory wouldn’t take too long per explosion. You can of course do this at any resolution - doesn’t have to be pixel perfect.
Integrating this with physics is a much harder challenge. If you only need simple physics functionality like that found in early Worms games, you could write your own “raycasting” on that pixel mask.
You can also achieve this using procedural meshes (like a 2D voxel terrain). I’m working on something along those lines ( http://www.6stringsand16bits.com/ - if you scroll down a bit there’s the first part of a brief overview of how it works, I’ve yet to write the follow up pieces).
But probably better is these really good tutorials that explain this stuff in some detail, check this forum post: