# Exploding Particles

**URL:** <https://forum.kirupa.com/t/exploding-particles/264574>\
**Category:** programming\
**Created:** [June 27, 2008, 12:20pm UTC](https://forum.kirupa.com/t/exploding-particles/264574 "2008-06-27T12:20:45Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jephz](https://avatars.discourse-cdn.com/v4/letter/j/58956e/32.png) [@Jephz](https://forum.kirupa.com/u/Jephz)\
**Post date:** [June 27, 2008, 12:20pm UTC](https://forum.kirupa.com/t/exploding-particles/264574/1 "2008-06-27T12:20:45Z")

</div>

Hiya, I’m making a RPG and I want my “heart” symbol to explode into particles when the player hitTests it. Is there any other way to do that kind of effect without having to animate each and every particle? (And also not lagging the whole game).

I want to have particles like these:

[http://www.increditools.com/flash\_particle\_studio/samples.php#](http://www.increditools.com/flash_particle_studio/samples.php#)

Look at the “Sparkle” Animation.

PS: I can’t use Flash Particles Studios because its not compatible with a Mac.

---

<div class="post-metadata">

**Author:** ![Sirisian](https://avatars.discourse-cdn.com/v4/letter/s/439d5e/32.png) [@Sirisian](https://forum.kirupa.com/u/Sirisian)\
**Post date:** [June 27, 2008, 12:37pm UTC](https://forum.kirupa.com/t/exploding-particles/264574/2 "2008-06-27T12:37:19Z")

</div>

Most of these are just rendering a white image at fading alpha to a bitmapdata. Make a class for a particle that takes reference to a bitmapdata image. Give it properties like color (with alpha), position, velocity, and life. Then make an emitter class with an array of said particles, a position and velocity, and a life number and attributes like spawn rate, spawn min and max radius and other things. Then make an emitter manager class with an array of emitters and functions to insert new emitters that take the parameters like position, velocity and such.

(In order to get good performance the only method is to use bitmap rendering, use copy pixels basically on a bitmapdata the size of the screen, if you need rotating particles then you’ll need to store the rotations as separate bitmaps, if you need help with that ask).

---

<div class="post-metadata">

**Author:** ![Jephz](https://avatars.discourse-cdn.com/v4/letter/j/58956e/32.png) [@Jephz](https://forum.kirupa.com/u/Jephz)\
**Post date:** [June 27, 2008, 12:52pm UTC](https://forum.kirupa.com/t/exploding-particles/264574/3 "2008-06-27T12:52:17Z")

</div>

Oww, my brain hurts already lol, isn’t there a simpler way to do it? I know the particle effect is pretty complicated but my AS level on a scale of 1-10 (10 being the best) its probaly around 2.5. I was thinking about a Particles program like Flash Particles Studios thats compatible with a Macintosh.

---

<div class="post-metadata">

**Author:** ![Insane\_au](https://avatars.discourse-cdn.com/v4/letter/i/439d5e/32.png) [@Insane\_au](https://forum.kirupa.com/u/Insane_au)\
**Post date:** [June 27, 2008, 4:36pm UTC](https://forum.kirupa.com/t/exploding-particles/264574/4 "2008-06-27T16:36:03Z")

</div>

sekasi recently posted an experiment that is similar to what you describe:

> **[vector/bmp into fireflies ; )](https://www.kirupa.com/forum/showthread.php?t=301395)**
>
> Got a web design/development question or just want to hang out with the most awesome people on the planet? Drop on in!

---

<div class="post-metadata">

**Author:** ![Iamthejuggler](https://avatars.discourse-cdn.com/v4/letter/i/ecc23a/32.png) [@Iamthejuggler](https://forum.kirupa.com/u/Iamthejuggler)\
**Post date:** [June 27, 2008, 5:52pm UTC](https://forum.kirupa.com/t/exploding-particles/264574/5 "2008-06-27T17:52:37Z")

</div>

Particles are pretty hard to understand without a pretty good understanding of actionscript.

Andre Michelle also has a very cool example of this. Source available.

> **[André Michelle Archive](http://lab.andre-michelle.com/bitmap-particles)**
>
> Good bye Flash! Thanks for 10 years of tinkering, fiddling, bothering and lots of fun. For sentimental purpose you can watch some of my old Flash experiments here.

That guy always makes me feel stupid!

---

<div class="post-metadata">

**Author:** ![Jephz](https://avatars.discourse-cdn.com/v4/letter/j/58956e/32.png) [@Jephz](https://forum.kirupa.com/u/Jephz)\
**Post date:** [June 28, 2008, 6:26am UTC](https://forum.kirupa.com/t/exploding-particles/264574/6 "2008-06-28T06:26:24Z")

</div>

Ah ok, I guess your right therobot. Oh and btw, I use AS2 and Flash 8 don’t have CS yet 😑

---

<div class="post-metadata">

**Author:** ![TheCanadian](https://avatars.discourse-cdn.com/v4/letter/t/67e7ee/32.png) [@TheCanadian](https://forum.kirupa.com/u/TheCanadian)\
**Post date:** [June 28, 2008, 6:46am UTC](https://forum.kirupa.com/t/exploding-particles/264574/7 "2008-06-28T06:46:22Z")

</div>

I’m almost 10 billion percent sure that the examples you posted were done in AE.

---

<div class="post-metadata">

**Author:** ![misterooga](https://avatars.discourse-cdn.com/v4/letter/m/6de8d8/32.png) [@misterooga](https://forum.kirupa.com/u/misterooga)\
**Post date:** [June 30, 2008, 4:29pm UTC](https://forum.kirupa.com/t/exploding-particles/264574/8 "2008-06-30T16:29:37Z")

</div>

[quote=Iamthejuggler;2350285]Particles are pretty hard to understand without a pretty good understanding of actionscript.

Andre Michelle also has a very cool example of this. Source available.

> **[André Michelle Archive](http://lab.andre-michelle.com/bitmap-particles)**
>
> Good bye Flash! Thanks for 10 years of tinkering, fiddling, bothering and lots of fun. For sentimental purpose you can watch some of my old Flash experiments here.

That guy always makes me feel stupid![/quote]

Man… half the stuff I didn’t think it was possible in flash… thanks for the link… and yes it does make me feel stupid but it also gives me tons of inspiration for some of my games…

■■■■… I gotta pace myself though… 😛
