Spielerando

Let rain stop at a roof or an umbrella and splash on whatever it hits

Rain drawn as falling lines across the whole screen looks wrong in a scene with a porch, a bridge or a character with an umbrella: the drops pass straight through. Checking every drop against every roof is costly on a phone. Here is a rule that needs no list of drops and still ends each line at the right height.

Why this works

Rain looks real when it stops at what is above you and shows where it hit. Each streak only has to know the first thing in its way, not follow a drop, so thousands of them cost almost nothing and a moved roof changes things at once.

When not to use it

Not when rain does something to the game, like filling a bucket, putting out a fire or making the floor slippery. Then drops must be real things with a place, and this pure picture cannot count them.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 3 common mistakes and the fix
  • 38 lines of example code with 4 checks that pass
  • How your AI shows you that it works

Say this to your AI

Use the Spielerando entry "Let rain stop at a roof or an umbrella and splash on whatever it hits" (read_entry rain-streaks-stop-at-roofs-and-splash-where-they-land) in my game. Build it step by step, and show me how you checked that it works.

Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP