AS3 Sweet lightning particles

October 28th, 2005

Over thousand particles with little scalings on the buffer bitmap can look really sweet.

I've coded them with 120 fps just for my entertainment, but decided after a while to store some of them. In firefox they slow down to 30fps on my computer. Make sure, you see them with the internet explorer, with provides still faster flash movies. The class is always in the same folder called PerlinForce.as.
Compile them with these parameters: -default-size 256 256 -default-frame-rate 120 -optimize. Do not expect documented code. The complete movement comes from a perlinnoise, where the pixels get they vectors from.

00 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 (FlashPlayer8.5)

Filed under: actionscript

38 Responses to “AS3 Sweet lightning particles”

  1. Jon B Says:
    October 28th, 2005 at 10:14 pm

    Damn you, that is so good! Next you should combine this sort of thing with the new sound control too and produce an awesome ‘visualisation’ for music.

  2. Jon B Says:
    October 28th, 2005 at 10:16 pm

    P.S. you mention compiling instructions and talk as if you have made the source available but you haven’t yet, just in case it was an oversight.

  3. David R Says:
    October 28th, 2005 at 10:16 pm

    It runs about 60fps for me, on my 2ghz amd. However, cpu usage stays pretty low, around 15%

  4. André Michelle Says:
    October 28th, 2005 at 10:23 pm

    @jon: It’s in the some folder as the swfs.
    like this

  5. Jon B Says:
    October 28th, 2005 at 10:27 pm

    ah, so it’s like an intelligence test… and I failed :(

    Thanks, I’m going to learn a lot from this.

  6. Peter Says:
    October 28th, 2005 at 10:35 pm

    wow imagine this in combination with soundspectrum — could make a very cool AS3 MP3 player :)

  7. Jon B Says:
    October 29th, 2005 at 1:28 am

    Hey Peter, I said that straight after my last post but it never showed up lol, guess this blog doesn’t like too many posts in a short period.

  8. Tink Says:
    October 29th, 2005 at 2:10 am

    These rock. nice one for sharin the source!

  9. » AS3 Sweet Lightning Particles Says:
    October 29th, 2005 at 2:15 am

    [...] ghtning Particles

    October 29th, 2005

    Check out this particle stuff with all the source over at andres blog.
    Entry Filed under: [...]

  10. Metah Says:
    October 29th, 2005 at 3:43 am

    Very strange i have no result with tiger (but flash player 8.5.0.133). But run great on my pc. Really nice work :)

  11. Blog Archive Says:
    October 29th, 2005 at 4:41 am

    [...] AS3 Sweet lightning particles andré michelle 总是带来精彩… 虽然很耗CPU,但flash能做到� [...]

  12. majman Says:
    October 29th, 2005 at 5:50 am

    soooooooooooooooooo good. i’m envious of your skills

  13. 6iyd Says:
    October 29th, 2005 at 4:18 pm

    my FPS tests :
    embed in my FF = 40 FPS
    embed in my IE = 65 FPS
    in my Standalone Player = 85 FPS

    tested with 00/PerlinForce.swf
    Athlon XP3200+ 2.2GHz

  14. Zorro Says:
    October 29th, 2005 at 7:27 pm

    AM - This man have 2 brains and 4 hands

  15. Franto.com Says:
    October 29th, 2005 at 10:17 pm

    [...] + example) AS3 Bumbmaps (source + example) How to use Sockets in Actionscript3? (source) Lightning particlesAndre Michelle (9 different sources + exam [...]

  16. joa Says:
    October 30th, 2005 at 8:19 am

    Does perlin noise depend on the quality level of the player? Because you are drawing everything into one buffer like I do it all the time.

    If I put my particles in low quality I achieve another speed boost.

    http://blog.je2050.de/?p=40
    (Set quality to low)

    Here another example with 1600 particles. Using a smaller size speeds up the blendMode so I used 4×4 pixels for each particle. Quality is set to low from the beginning.

    http://je2050.de/showroom.php?file=1600Particles

  17. Engless’s Lie » Blog Says:
    October 30th, 2005 at 3:55 pm

    [...] ��的趋势看,也许它能做的一定会超出我们每个人的想象,一定会的 andré michelle 总是带来精彩… 虽然很耗CPU,但flash能做到� [...]

  18. Feudum Says:
    October 30th, 2005 at 5:48 pm

    [...] « Test Test AS3 Sweet lightning particles From: http://blog.andre-michelle.com/2005/as3-sweet-lightning-particles Over thousand [...]

  19. Jon Bradley Says:
    October 31st, 2005 at 2:21 pm

    This looks like great stuff Andre!

    Unfortunately, none of these examples work on OS X for some reason - has anyone else gotten them to run?

    Pretty much every AS3 example I’ve seen so far, minus the ones on your site, function fine. I can’t for the life of me figure out why.

  20. Zevan Says:
    October 31st, 2005 at 10:51 pm

    These are really beautiful. :)

  21. Andrew Says:
    November 1st, 2005 at 1:50 am

    Would someone mind explaining the correct/easiest way to compile and use the class files? I’m sure it is trivial, but when I try to add a Sprite to an application (mxml)I get errors. It would be great to have a complete project for reference.

  22. Andrew Says:
    November 1st, 2005 at 1:57 am

    OK. I just realized that the class files can be compiled as ActionScript projects instead of trying to incorporate them into a Flex project. Now they work fine.

    But, if I wan’t to use them in a Flex project, what is the best way to add a Sprite to a DislpayList object?

    Thanks.

    Andrew

  23. JBFricke » Morning Digest Says:
    November 1st, 2005 at 4:39 pm

    [...] the Forums there is a post to a collection of AS3 examples. (I’m still a fan of the Lightning Particles)

    Leave a [...]

  24. mh Says:
    November 1st, 2005 at 9:32 pm

    Andre, you seem to use high frame rates here, i always understood that you should try and keep these as low as possible. What have i missed?

  25. KinRou Blog » AS3 particule system Says:
    November 2nd, 2005 at 3:19 pm

    [...] November 2nd, 2005 Andre Michelle made a nice particule system in as3 http://blog.andre-michelle.com/2005/as3-sweet-lightning-particles/ [...]

  26. Sergei Yakovlev Says:
    November 11th, 2005 at 12:16 pm

    Andre, the screenshots are amazing! Too bad I can’t see it live as it doesn’t show anything in FP 8.5 for Mac OS X. The performance improvements in 8.5 are simply stunning, but I hope Macromedia still keeps Flash technology cross-platform.

    Anyway, keep up the good work!

  27. oddhammer blog Says:
    November 30th, 2005 at 5:39 am

    [...] tzeroone.com/blog/max_2005/tiny_update_and_an_example_of.html

    AS3 lightening particals
    http://blog.andre-michelle.com/2005/as3-sweet-lightning-particles/ [...]

  28. blog.je2050.de - blog and database of joa ebert » Extensible Particle System Says:
    January 14th, 2006 at 1:51 pm

    [...] about policies. You can create combined policies. For example the ForceFieldAction uses a forcefield to set the velocity. You could combine this policy [...]

  29. skirt Says:
    March 22nd, 2006 at 10:18 pm

    This man have 2 brains and 4 hands
    haha

    yes yes

    so impossble“

  30. dixon Says:
    April 30th, 2006 at 9:37 am

    very nice!:)

  31. jaff Says:
    August 1st, 2006 at 1:09 pm

    come on baby,you are so strong with math and you seem to be combined with computer,is that you mind to be expressed in image,so unreal

  32. Taurizio Says:
    September 9th, 2006 at 11:23 pm

    Plz post this stuff again with sources for education.

  33. yankee Says:
    December 10th, 2006 at 6:49 am

    Nice Stuff. Thanks

  34. ip Says:
    April 8th, 2007 at 2:47 pm

    Why can’t i see anything when i click on the numbers above the figures …?
    except http://404.andre-michelle.com/
    :(

  35. sohbet Says:
    July 20th, 2007 at 12:00 am

    anything when i click on the numbers above the ?***

  36. JP Says:
    November 15th, 2007 at 8:18 am

    The links to the flash experiments are broken ?

  37. DeCabeza.net » Colección de link útiles sobre ActionScript 3 - desarrollo web, tutoriales, video tutoriales, videotutoriales, flash, photoshop, php, mysql, dreamweaver Says:
    June 27th, 2008 at 4:33 pm

    [...] Partículas de LuzAndre Michelle [...]

  38. Glen Charles Rowell Says:
    July 2nd, 2008 at 6:13 am

    Where are the examples? All the links are broken.

    Regards,

    Glen Charles Rowell

Leave a Reply