Spielerando

The game stutters now and then and I do not know which building is to blame

The building that uses the most time overall is not always the one that causes the stutter. This entry gives your AI a timing report that ranks buildings two ways, by total cost and by how badly they spike, so it fixes the right one.

Why this works

A steady cost makes the game slow, a rare big cost makes it stutter. They need different fixes, so one ranking cannot serve both: the first needs cheaper work, the second needs the work spread out.

When not to use it

Skip it if the stutter comes from drawing rather than from game logic; then time the frame parts instead (logic, drawing, sound) before you look at buildings.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 3 common mistakes and the fix
  • 37 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 "The game stutters now and then and I do not know which building is to blame" (read_entry strategy-which-building-causes-the-spikes) 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