Spielerando

Fix tiles that float, overlap or fall in the wrong order after a clear

After a match the tiles above should drop into the holes, but some stay hanging, two end up in one place, or the fall animation jumps. This entry shows how to make the AI settle each column from the bottom up and report exactly how far each tile fell.

Why this works

Things below must move before things above can follow, or they land on each other. Work from the bottom of each column, and keep a single spot that marks the next free place. Each tile then goes there once, and the list of moves is exact.

When not to use it

This is for tiles that all fall straight down. If tiles slide sideways to fill holes, hang from the ceiling, or stick to neighbours, one pass per column is not enough. Settle in rounds until nothing moves, and decide the order of ties in advance.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 4 common mistakes and the fix
  • A diagram of every state
  • 21 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 "Fix tiles that float, overlap or fall in the wrong order after a clear" (read_entry tiles-fall-wrong-after-clearing) 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