Spielerando

Keep startup, hit and recovery phases right when a slow effect stretches them

When a slowing effect stretches an enemy attack, the danger moment can end up a frame longer or shorter than the animation, and the total length drifts. This entry shows how to stretch the phases so they still add up exactly.

Why this works

Parts that must add up to a whole should be cut from the whole, not rounded one by one. Small rounding errors in each part pile up, while rounding the dividing lines only once guarantees that the pieces always meet exactly.

When not to use it

Skip it when attacks never get faster or slower, so every move simply keeps its fixed lengths. It also does not suit moves with a pause the player controls, such as a held charge, where the length is not known in advance.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 3 common mistakes and the fix
  • 29 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 "Keep startup, hit and recovery phases right when a slow effect stretches them" (read_entry attack-phases-when-animation-speed-changes) 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