Hi Carlos,
I have been playing with the code and try to make a liquid simulation. As showed here http://developer.anscamobile.com/code/liquid-simulation-corona-sdk
The algorithm is easy and it should be fast but, after a tons of optimizations, it seems that the bottle neck is the fill() rutine which is like a flood fill algorithm adding display.newLines() objects and removing them each frame.
Could be a good idea to add something similar but inside Corona by creating a new display object:
display.newMetaball()
As you can see from my code, we just need a gray buffer to draw all blur balls in additive way, then use a threshold to make them full intensity. This will simulate the liquid as proven in my code.
But in a faster way if it’s inside the native Corona.
Thanks in advance and I hope to see this soon.
Emilio
[import]uid: 9975 topic_id: 17202 reply_id: 317202[/import]