>>56371016>>56370989You just look at "how many sprites do I have available". Let's call it N. Then the last N sprites in OAM are available.
Ok for each sprite you can assign a rain-drop. Each rain drop gets assigned a random X and Y coordinate, by writing to shadow OAM.
Then you allocate a single byte for every K rain-drop, and start decrementing this every frame, let's call it T_K because it will be time. When T_K = t0 then by having constrained the starting Y coordinate you know that every single rain drop among those K have zoomed out of the visible area of the screen.
Grouping together is an optimization to save RAM. You update X Y each frame by subtracting the slope.
The next step is deciding to randomly have the rain drop hit the ground.
You can store this alive/dead state in a bit-flag. You'll need two bits per raindrop, so K is now constrained to 4
The two bits store the one of Falling, Hit, Vanishing, Gone