Spielerando

A button, enemy or sign that wobbles and settles after being hit

A wobble driven by trial and error runs differently at every frame rate, explodes with big steps, or never fully stops. A spring with friction that is calculated exactly behaves the same everywhere. Here is the calculation and the values that look like rubber, wood or jelly.

Why this works

Real things that get knocked swing back and forth and lose a little energy each time until they rest. Adding the knock to the speed, not the position, and using the exact result for each step gives the same wobble on every screen and never goes wild.

When not to use it

Skip it for things that should feel solid or heavy, such as stone walls, big machines or a serious interface, where bouncing looks silly. Use a quick flash or a single small shift that stops at once.

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 5 checks that pass
  • How your AI shows you that it works

Say this to your AI

Use the Spielerando entry "A button, enemy or sign that wobbles and settles after being hit" (read_entry hit-wobble-with-damped-spring) 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