
metadata
I found a really neat applet by BlueThen on dough. The program was in Java, and was checking the distance between two points. If the points were close enough, the points were then connected. Then the points would have to be farther away to be disconnected. I thought it would be a great way to simulate fluid. The applet in question which can be found [here](http://bluethen.com/wordpress/index.php/processingapps/dough/) used thousands of points. If I ported this to AS3 for my game, how many points do you reckon could be added before the SWF drops below 25 frames?


metadata
> *Originally posted by **[jasonjie88](/forums/4/topics/284284?page=1#posts6132597):***
>
> I found a really neat applet by BlueThen on dough. The program was in Java, and was checking the distance between two points. If the points were close enough, the points were then connected. Then the points would have to be farther away to be disconnected. I thought it would be a great way to simulate fluid. The applet in question which can be found [here](http://bluethen.com/wordpress/index.php/processingapps/dough/) used thousands of points. If I ported this to AS3 for my game, how many points do you reckon could be added before the SWF drops below 25 frames?
TBH it entirely depends on how you implement it. Blitting/bitmap/bitwise and all that you could probably get a decent amount.


metadata
I don’t believe blitting is going to be the most expensive part of those calculations. I think the math might take longer than the rendering easily.
You still probably could be looking at several hundred points at 30 fps.


metadata
> *Originally posted by **[UnknownGuardian](/forums/4/topics/284284?page=1#posts6132877):***
>
> I don’t believe blitting is going to be the most expensive part of those calculations. I think the math might take longer than the rendering easily.
>
> You still probably could be looking at several hundred points at 30 fps.
Yea, blitting wouldn’t take much work but using a Vector and bitwise ops you could easily triple the speed from Arrays and standard mathematical equations.
Edit: Spatial partitioning would vastly increase performance also.


metadata
I did something somewhat related in AS3 a long time ago.
[http://megaswf.com/s/2458657](http://megaswf.com/s/2458657)
Since it was a long time ago (when I knew even less than I do now), I guarantee that the code could be extremely optimized.
