Hi!
I remember Superku made something similar for his game. He used shader as far as I remember, look at his project's thread, or maybe you could PM him (or maybe he will see this topic, and will answer here
). Anyway, you could recreate your code from A6 in A8, but use 2d array intead (just a wild idea), something similar to fluidfill algorithm, where everything is seperated into the cells, and they are all connected between each other... Anyway, I'm just guessing
Best regards!
Edit: here is the video I was talking about:
Superku 17.02.2012 - Cape Physics