Results 1 to 9 of 9

Thread: Exploding Particles

  1. #1
    Jephz's Avatar
    106
    posts
    The Penguin n00b

    Exploding Particles

    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_pa...o/samples.php#

    Look at the "Sparkle" Animation.

    PS: I can't use Flash Particles Studios because its not compatible with a Mac.
    Don't you ever, ever, EVER call me a Noob. I mean it!

  2. #2
    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).

  3. #3
    Jephz's Avatar
    106
    posts
    The Penguin n00b
    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.
    Don't you ever, ever, EVER call me a Noob. I mean it!

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

    http://kirupa.com/forum/showthread.php?t=301395

  5. #5
    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.
    http://lab.andre-michelle.com/bitmap-particles

    That guy always makes me feel stupid!
    My new hero: Chrysippus
    "Chrysippus is said to have died in a fit of laughter- having given wine to his donkey, he died of laughter after seeing it attempt to eat figs."
    What a legend!

  6. #6
    Quote Originally Posted by Jephz View Post
    my AS level on a scale of 1-10 (10 being the best) its probaly around 2.5.

    You should work on the gameplay & coding then, before you start tacking on fx

    If you're not careful in managing your effects, you'll get pretty poor performance out of the flash player.
    you = function(){
    setEnabled( true );
    live();
    setEnabled( false );
    }

  7. #7
    Jephz's Avatar
    106
    posts
    The Penguin n00b
    Ah ok, I guess your right therobot. Oh and btw, I use AS2 and Flash 8 don't have CS yet
    Don't you ever, ever, EVER call me a Noob. I mean it!

  8. #8
    TheCanadian's Avatar
    10,297
    posts
    Noo doot aboot it, eh?
    I'm almost 10 billion percent sure that the examples you posted were done in AE.
    Proud Montanadian
    We tolerate living and breathing. And niches.

    Name Brand Watches

    Maybe getTimer() or TweenMax is the answer to your problem . . .

  9. #9
    Quote Originally Posted by Iamthejuggler View Post
    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.
    http://lab.andre-michelle.com/bitmap-particles

    That guy always makes me feel stupid!
    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...

    Damn... I gotta pace myself though...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012