Spielerando

A destroyed tower still reacts to events and the game slows down over time

Things that listen for events must stop listening when they are removed, or they pile up and keep acting from beyond the grave. This entry gives your AI a log reader that finds who is still listening after being destroyed and which events have gathered the most listeners.

Why this works

Every listener is a promise to be called later. Counting how many were added minus how many were removed per owner shows who never took theirs back, and a destroyed owner with a positive count is a leak by definition.

When not to use it

Skip it if your game has a central manager that removes all listeners of an owner automatically when it is destroyed. Then test that manager once instead of reading logs.

In the full entry

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

Say this to your AI

Use the Spielerando entry "A destroyed tower still reacts to events and the game slows down over time" (read_entry strategy-destroyed-buildings-still-get-events) 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