FLASH 8: particle.swarm.draw

Here's a slightly modified version of the particle.swarm .swf from two days ago. Time the agents are acting as drawing points, illustrating the history of the swarm. Clicking anywhere will change color - pressing any key will swap between blur and non-blur.
This example used a modified version of Grant Skinner's bitmap caching routine to enable a whole tonne of lines to be drawn without hampering the memory. The lines are cached into a bitmap 6 times a second, and then the vectors are cleared from the memory.
There are 60 agents again in this example - a nice demo again of the performance increases in Flash 8. Not quite near the 10,000 agents that I have running in war.paint, but definitely an improvement.
10 Comments:
Hi,
Nice work. I attended your workshop at flashInTheCan - remember a section about loops and attachmovieclip. I was trying that out today, but can't seem to figure it out. Can you send me some of that code as examples.
Sorry I would have sent an e-mail, but I couldn't find the address.
I'd really appreciate it.
Oh, btw my e-mail is:
gavin@epochapex.com
Hi Gavin,
I'll dig up the FlashBelt demo files and fire them off to you.
Cheers,
-Jer
Thanks Jer,
I'd really appreciate it. Can't seem to find code examples as elegant as those you used.
gavin@epochapex.com
Very cool stuff!!! I'm trying to access the source, but cannot..Im getting error 404: file not found. I'd like to try the code with more agents - say 1000?
Hey... I miss-spelled the URL. Try it now - it should work fine!
Glad you liked it. 1000 might be pushing it... the F8 player us better, but not quite that good. 1000 would be easy as pie in processing, though. Maybe I should port it.
SWEETNESS! yep! the link worked. thanks! you said 1000 would be pushing it, but what did you mean by 1000 would be easy in processing? does this only work for flash 8? not on flash mx 2004 pro? I'll try a test with 100 then go up to 1000, I'll report my findings here. thanks again!
This piece is in Flash 8 - the bitmap caching in F8 is what makes the drawing possible without bogging down the processor. I think 100 should be doable on a PC, but 1000 would almost definitely be pushing it in Flash.
Processing - a program written in Java and made specifically for this kind of task, has more processing power and would be able to run a lot more particles... 10,000 probably wouldn't be a problem.
Do you have the same swarming behavior but written in Processing?
Hey,
I stupidly posted my e-mail address on this blog post a long time ago and the SPAM is getting a big crazy.
If you could delete that comment up- above with my e-mail addy in it, I would really really appreciate it.
Thanks Man!
Gav
Post a Comment
<< Home