Spent this week making a little Worms/Scorched Earth terrain demo. Tried making one of these with my first ever #pico8 project and ran into massive performance issues due to using pset.

This uses tline and a 2D array of vertical slices. Destroying the terrain earth shrinks a slice, or cuts/slices it into two. Perf is good, as terrain is destroyed, there are more slices, but less to draw! Second gif shows this in action.

Code/cart is here https://www.lexaloffle.com/bbs/?tid=140579

Tline Terrain Demo (Worms/Scorched Earth terrain)

@Powersaurus @foone I remember trying to implement something like this in JavaScript over a decade ago, but I used quadtrees instead of strips like this. I don't remember why I stopped.
@Powersaurus @foone Ah, I remember now what it was for. It was for some sort of climbing game idea I'd come up with where you had to get to the top of a mountain, but the mountain itself was destructible. I wanted loose pieces to dynamically fall, and I think the process of isolating those was too much of a hassle so I gave up. I seem to recall wanting to triangulate them into a vector representation so they could rotate and stuff too. A fully destructible 2D environment with a physics engine applied...I think the JS version was just a proof of concept.
@endrift that would be more complicated that what I've got here. Sounds like an interesting concept though - there's still not enough destructible terrain in games!
@Powersaurus It was far more ambitious than I was going to be able to manage myself, that's for sure.