Spielerando

Spread attackers around the player so they do not stack on one spot

Five enemies run at you and end up as one blob, shooting from the same pixel. Here is how to give each a place of its own around the target, how to keep them from crossing paths on the way, and what to do when the blob arrives from one side.

Why this works

If each enemy simply takes the closest free place, who gets what depends on who is handled first, and paths cross. Places spaced evenly around a circle keep their order, so shifting everyone along by the same amount hands out places without anyone crossing.

When not to use it

Don't surround the player when the game is a corridor, a side-scroller or a duel, where there is no room around. Swarm-style enemies that are meant to blob up also look wrong when spaced out neatly. Use lanes or a single queue instead.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 3 common mistakes and the fix
  • 33 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 "Spread attackers around the player so they do not stack on one spot" (read_entry give-each-attacker-its-own-slot) 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