A Flash Developer Resource Site

Results 1 to 20 of 50

Thread: [Flash8] particles using bitmaps

Threaded View

  1. #1
    \x3a\x6f\x29
    Join Date
    Sep 2005
    Location
    paris
    Posts
    88

    [Flash8] particles using bitmaps

    in my eyes, the best parts of flash8 are the bitmapdata and filter methods.
    now we are able to use well-known technics that come from opengl for example in flash.

    i wanted to do some fire effect in flash.
    a year ago i developed a simple particle system in flash7. this gave me the idea of what is possible using particles. but of course they are to slow to be implemented in a game.

    http://www.je2050.de/fla.php?file=ParticleTest

    now i wanted to do some fire effect in flash8.
    the first thing that came to my mind was doing this using pixel access.
    here is an example of an old-school fire effect. it is of course very slow so it is only 50x50 px and looks not very good

    http://www.je2050.de/showroom.php?file=fire
    (mouseclick changes blendmode)

    then, there was a post on tinics blog. he also did a nice fire effect using flash8 filters

    http://www.kaourantin.net/2005/08/li...ect-using.html

    but because i really like particles i started with an idea that comes from opengl/directx whatever.

    - load a greyscale bitmap
    - colorize it
    - draw it

    a simple example with ugly textures and ugly code is

    http://www.je2050.de/showroom.php?file=bitmapfire

    and here some eyecandy and also to show the speed of this technic.
    100 particles, changing color at runtime(!!)

    http://www.je2050.de/showroom.php?file=bitmapparticles

    i think they are now fast enough to be used in games for some eyecandy :o)

    source:
    http://www.je2050.de/stuff.php?p=/source/effect/
    (fire.as is the pixel-fire and particle.as is used in the two other examples)

    btw. two things i discovered about speed:
    - it is faster to use _alpha insted of using a matrix
    - it is faster to apply a filter to a movieclip instead of a bitmap
    Last edited by joa__; 09-15-2005 at 08:27 AM.

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center