Hello
Coded with Dark Basic Professional Vesion 6.something
This is a snippet that does what the thread title suggests - blows stuff up in 2D
Similar to games like Worms, it basically destroys mountains, buldings, whatever images you choose to use.
It uses a combination of the various DBP memory commands to do what it does.
Here's a couple of screenshots.
Before, everything was nice and calm
[img]
[img=http://img152.imageshack.us/img152/8954/destuctable2dlandscapescreenie001sm6.th.jpg]
[/img]
After a total mass carnage fest with mouse button.
[img]
[img=http://img181.imageshack.us/img181/7167/destuctable2dlandscapescreenie002eu1.th.jpg][/img]
All required files (DBP source files and media) have been attached in a zip folder.
The source file is commented but any questions about how it is coded are welcome.
It's not perfect or anything, it is meant more as a demo of the principles involved in blowing up landscapes in 2D.
Usage :
Just the mouse buttons
Left Button triggers an explosion event at the mouse cursor position
Right Button switches between Single and Multi Explosion modes
Credits :
IanM for invaluable advice on using the Backbuffer Commands
David Gervais for the 2D artwork
sshhhhhh!.... don't tell him, I didn't actually ask him.
but he seems like a nice person so I don't think he'll mind.
Enjoy.
*** edit ***
Also, a compiled EXE is in the zip file for those without access to DBP.