Spielerando

Draw a crackling lightning bolt that jumps from enemy to enemy

A straight line between enemies looks like a laser, and random zigzags too wild look like a scribble that flickers into a different shape every frame. Here is a way to build a convincing bolt that has the right amount of jaggedness at every size and holds still until you change it.

Why this works

Natural jagged lines look alike at every size: big kinks made of smaller kinks. Building the bolt coarse first and fine later, with each kink sized to the stretch it sits on, keeps the character at any length, and fixed dice rolls keep it still.

When not to use it

Skip it for an effect that should look man-made, like a laser, a beam or a power cable, or when a flicker is wanted for fear or danger. A straight line or a fresh bolt on every frame gives those looks.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 4 common mistakes and the fix
  • 28 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 "Draw a crackling lightning bolt that jumps from enemy to enemy" (read_entry chain-lightning-bolt-that-zigzags-the-same-every-run) 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