Spielerando

Make a burst of sparks or confetti spread evenly, with a fixed number of slots

Random directions leave gaps and clumps, so a burst looks lopsided, and many bursts on screen at once can slow the game or fill memory. Here is a way to spread particles evenly at any count and a fixed pool that quietly recycles the oldest when full.

Why this works

Pure chance leaves gaps and clumps, while a fixed step makes a visible star. Stepping around the circle by an irrational fraction fills it evenly with no pattern, however many pieces you add. Reusing a fixed set of places keeps the effect cheap and its cost known.

When not to use it

Wrong for pieces that matter, like pickups, bullets or anything the player must find or dodge. These must never be overwritten by the next burst. Give them their own list with real rules.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 4 common mistakes and the fix
  • 61 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 "Make a burst of sparks or confetti spread evenly, with a fixed number of slots" (read_entry spark-burst-that-fills-evenly-and-reuses-slots) 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