Destroying background Worms-style. Is it possible?
Hi,
I'm new here and have squabbled with the good old TGF for a few years and made some crappy games along the way. I've always had this one little problem in games that require terrain destruction.
So, the objective is to destroy a part of the ground Worms-style.
I've used the method of creating an active object "Hole" on the spot where the "Bomb" exploded and got destroyed and then pasting the image of the "Hole" on the backdrop and then destroying the "Hole". This works fine, when the colour of the sky is the same as the colour of the "Hole". But when the sky is multicoloured the trick won't obviously work.
Is it possible to destroy background some other way in TGF2/MMF2, so one could have gradient or even pictured backgrounds and still wreak havoc on the backdrop in front?
~xvarp
EDIT: added information about the problem.
Re: Destroying background Worms-style. Is it possible?
It's possible to accomplish something like this with the Overlay Redux (I've done it before). Just fill the overlay with your terrain. Then, when you want make a hole, use the "draw ellipse" function to make a circle with color index 0 (you could also do this with an active object). It's possible to have backdrops, actives, and even parallax scrolling behind this.
Unfortunately, in doing this, you give up MMF's nice "overlapping backdrop" functions. You have to do this yourself by reading colors from the overlay. In your case, you probably just want to know that the color is != 0 (which means it's terrain).
EDIT: Just in case you don't know, Overlay Redux is an extension for MMF2. You might have to download it --- search around on the website and it should come up.
Re: Destroying background Worms-style. Is it possible?
I haven't tried, but you might use the layers in MMF2. Make the terrain in one layer, and the background sky in the other. Now when a bomb collides with the terrain layer- it might only remove the terrain... I dunno if it'll work, but it's worth a shot.
Re: Destroying background Worms-style. Is it possible?
I take that back. Realize now that it won't work :(
Re: Destroying background Worms-style. Is it possible?
like UW said, use Overlay Redux. ;)