Exploding png

BlitzMax Forums/BlitzMax Beginners Area/Exploding png

DannyD(Posted 2006) [#1]
Wondering if anyone has written some code that 'explodes' an image. I guess there are a few approaches but all involve breaking the image into multiple pieces and moving them offscreen or fading them out.

Any suggestions/help/code appreciated.


CS_TBL(Posted 2006) [#2]
Is it for typical sprite explosions (sizes of 32x32 64x64 etc.)?

I thought about it once. Some weeks ago I made a particle system in which the particles were small rotating pieces in all colors, as if some thing exploded into pieces in quite a realistic way. I concluded that any attempt to break an image (the 'official' way) would be kinda like a waste of time. A thing you could do to have it a few % more realistic is grab a number of important colors from the image and apply those on the particles.


DannyD(Posted 2006) [#3]
Not really sprites but a picture perhaps 200x200.


jkrankie(Posted 2006) [#4]
you could load the sprite as an animimage, and store positions in an array or something. when you blow it up you can then just move parts of the image in your array.


gburgess(Posted 2006) [#5]
You could load the image, break it into tiles and then display it like that. When necessary, you can just move the tiles in whatever directions you want to give the desired effect.


Dreamora(Posted 2006) [#6]
Images must be power of 2 or the will be extended to the next power of two (which costs more VRAM and potential brings in the problem of unsupported image sizes when too large)