Inspired by my floor’s theme I am making batman. I used object-based coding to make the rain appear to fall. Adding music also gave it the batman like mood I was looking for. I think the way that half of the rain falls in front of him and half falls behind him was something that took me a while to conceptualize. Therefore this was a part of the code I was proud of.
// draw raindrops that go behind batman for (let drop of drops) { if (drop.z <= 1.5) { drop.fall(); drop.show(); } } //draw batman fill(0) noStroke() ellipse(200, 250, 100, 100) quad(400-250, 248, 250, 248, 400-120, 400, 120, 400) triangle(152,240,160,170,182,240) triangle(400-152,240,400-160,170,400-182,240) fill(255) quad(163,250,183,250, 190, 260, 170, 260) quad(400-163,250,400-183,250, 400-190, 260, 400-170, 260) // then draw the raindrops in front of batman for (let drop of drops) { if (drop.z > 1.5) { drop.fall() drop.show(); } } } //making the raindrops fall class RainDrop { constructor() { this.x = random(width); this.y = random(-height, 0); //perspective this.z = random(1, 3); // this makes the background slower than the foreground this.speed = map(this.z, 0.5, 2, 2, 6);
In terms of improvements I definitely could have made batman less minimalistic, and I think doing some other things to the rain to make it even more real (vary thickness of raindrops to account for perspective and stuff like that) which would add to the artwork. Lastly, adding some sort of more interactive element would have also made it better.
Moody! Splitting the rain in front / behind is a great idea. Visually it doesn’t come across very clearly though – you could go a bit further and make the rain behind more visually distinct by for example making it a bit darker, smaller, and falling slower so it would appear to be further in the distance. Also, “Batman” should be capitalized since it’s a proper noun / name. He looks pretty severe, in a good way!