Hit stop

Watch the instant of contact twice, once with hit stop and once without. When can you see the impact pose most clearly?
Interactive demo#MotionAndFeelHotline Miami
Freezing the action for a few frames at the moment of impact.
A pause of a tenth of a second gives the eye time to register the hit, which makes it feel heavier. Fighting and action games lean on it heavily. Turn it off and the same hit passes almost unnoticed.
Code
namespace hit_stop_lesson;
import stage;
import std;
import math;
export "hit-stop" fn draw(time: f64, dt: f64, px: f64, py: f64, hover: bool) {
artwork("hall", 0, 0, W, 125);
let t = time % 2.4;
let hold = 0.22;
let enabled = toggle("on");
let frozen = enabled && t >= 1 && t < 1 + hold;
var action = t;
if enabled && t >= 1 {
action = max(1.0, t - hold);
}
let elapsed = max(0.0, action - 1);
ground();
let x = if action < 1 { 20 + 54 * action * action * action } else { max(58.0, 74 - elapsed * 40) };
actor(x, GY, if action < 0.8 { walk(action) } else if action <= 1 { REACH } else { LAND }, 2, if frozen { "white" } else { "base" }, "knight");
actor(98 + elapsed * 110, GY - max(0.0, 70 * elapsed - 120 * elapsed * elapsed), if action < 1 { STAND } else { DESCEND }, 2, if frozen { "white" } else { "rose" }, "knight", true);
if frozen {
cross(86, GY - 12, MAG, 9);
cross(86, GY - 12, WHITE, 5);
}
}

Comments
No comments yet.