The main challenge here is the performance. All particles are updated if needed and redrawn every cycle. The Particles array stores the state of all "game pixels". A value of 0 means that the pixel is empty. Other values mean that there is a particle on that pixel. Sand particles move down or...
www.b4x.com