Exploding png
BlitzMax Forums/BlitzMax Beginners Area/Exploding png
| ||
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. |
| ||
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. |
| ||
Not really sprites but a picture perhaps 200x200. |
| ||
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. |
| ||
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. |
| ||
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) |