In depth: Procedural water paint stains

Hi everyone! For our latest serious game I’ve worked on a neat little water paint stain generator. It generates the following results:

I’m quite happy with how it turned out! If you want to know more about how I’ve done this exactly, I’ve posted an article on our company website detailing the process :slight_smile:

You can read the article here: In depth: Procedural water paint stains - Grendel Games

1 Like

Interesting article, thanks. I read somewhere that GetPixel And SetPixel are relatively slow functions and it is faster to operate on arrays of pixels with GetPixels And SetPixels function. Maybe that was a bottleneck in
“BlitDrop” function on Android?

I didn’t go much in-depth about the optimization but we did indeed use the array functions. One other issue that still remained was that we called GetPixels on the drop sprite each time a drop was selected to blit (which is sometimes 10 times per frame).

GetPixels allocates a new array every time it is called. But since the drop sprites never change, they could easily be cached.

Glad you liked our article!

1 Like