Advertisement

explosion code

Started by January 27, 2001 05:33 AM
2 comments, last by penetrator 23 years, 10 months ago
Hi, I need some code (or some tips) which perform an explosion, doesn''t have to be necessarily through particles engines ! Thanks
With sprites just make explosion graphics and cycle through the frames...

With particles just draw say a pixel for each particle in the system and have them move away from the center in random directions.

There are alot of tutorials on the web about particle systems if you want a more in-depth look.


P.S. You can make explosion graphics in photoshop by using a black background setting the airbrush to dissolve and the color white, then spraying the area you want to be a fireball. Next gaussain blur the spots it makes, then Image->Adjust->Variations and up the red and yellow values until it looks right. Masking it is a whole different story, I suggest you just alpha blend it to get rid of the black outline..


Edited by - Caffeine on January 27, 2001 6:56:24 AM
Advertisement
If you use triangles to draw your object just multiply an incrseing value to the x,y and z coord. Then draw some explosion sprites in the middle of the objects
Then you can add shockwaves (Use tris, then make a ring (or 2..3) with Alpha blending, and then just decrease alpha until it is 0)

This topic is closed to new replies.

Advertisement