# Game feel composing shake, hitstop, punch, flash and particles ```{raw} html ▶ Run in browser ``` **Tags:** `2d` `juice` `camera` `coroutines` `particles` A target sits mid-screen; SPACE hits it. Each hit stacks five "juice" ingredients: camera shake, hitstop, a damped-sine punch on the target, a white flash, and a particle burst. Keys 1-5 toggle each ingredient so its individual contribution can be felt in isolation. ## Why each ingredient works - Camera shake (`Camera2D.shake`): jolting the whole view sells the impact's energy to the eye without moving anything in the scene. - Hitstop (`App.time_scale`): freezing time for a tenth of a second makes the frame of contact linger, which reads as weight. The restore timer runs on the wall clock: at a near-zero time scale coroutine dt is scaled to ~0, so a scaled `wait()` would never complete. - Punch (`punch_position` / `punch_rotation`): a damped-sine recoil on the target itself says the hit landed on THIS object, not on the camera. - White flash: a one-frame overlay marks the exact instant of contact, the visual equivalent of a click. - Particles: debris carries the energy outward and leaves an aftermath, so the hit has consequences beyond the frame it happened on. Controls: SPACE - hit the target 1..5 - toggle shake / hitstop / punch / flash / particles ESC - quit Run: uv run python examples/features/2d/juice.py Headless self-check: uv run python examples/features/2d/juice.py --test ## Source ```{literalinclude} ../../examples/features/2d/juice.py :language: python :linenos: ```