sprite ai
Give horizontal knockback its own motion policy
A character gets hit halfway through a jump. The art team delivers a knockback strip with a consistent airborne silhouette. Gameplay still needs to decide whether the hit suspends the existing height curve or adds horizontal displacement while the jump continues.
Keep these as separately named transitions in the controller. A stun that freezes the jump should stop the old tween before setting the new motion. An airborne push can allow the vertical track to finish while it changes x. Anchor both cases to the current position before applying the new displacement so that the cut between states has a clear reference point.
The technical guide and test fixture traces this behavior in Pygame Zero 1.2.1. Its native test records an older y track continuing while a new tween takes over x. That leaves a second ownership question when the old track completes and tries to start a landing state.
For a small acceptance test, record the action name and x/y coordinates at the hit, one update later, and at the old landing deadline. The suspended version should hold height after the hit and keep the new action active. The airborne version should preserve the expected height change and dispatch landing only if that state still owns it.
Prepared by the FrameSprite Workflow Team with AI assistance. Examples are illustrative unless attributed to a linked fixture.