Boxing counters
Two boxers trade combinations; most are slipped, blocked or rolled, and one cross lands.
Loading the take.
Each person is a chain of typed actions from @automovie/motions. This is what an agent writes for the scene; Composing motion explains the parts.
import type { IAutoMovieMotionHumanBody, IAutoMovieMotionHumanPerformance } from "@automovie/interface";
import { HumanChain, HumanDefence, HumanPerformance, HumanStageFight, HumanStrike } from "@automovie/motions";
// ana: body f1, at (0, 0) m, facing 0°, trained
const ana = HumanChain.subject("ana")
.act("guard", {
seconds: 1,
style: "boxing",
facing: { kind: "person", subject: "bea", region: "face" },
})
.act("step", { direction: "forward", steps: 1, guard: "boxing" })
.registered("jab", { at: { kind: "person", subject: "bea", region: "face" } }, "ba-jab1")
.registered("jab", { at: { kind: "person", subject: "bea", region: "face" } }, "ba-jab2")
.registered("cross", { at: { kind: "person", subject: "bea", region: "chin" } }, "ba-cross")
.registered("leadHook", { at: { kind: "person", subject: "bea", region: "liver" } }, "ba-body")
.registered("leadHook", {
at: { kind: "person", subject: "bea", region: "jawRight" },
}, "ba-hook")
.act("guard", { seconds: 1.2, style: "boxing" }, "ba-shell")
.registered("leanBack", {
from: { kind: "person", subject: "bea", region: "handBackRight" },
}, "ba-lean")
.registered("cross", { at: { kind: "person", subject: "bea", region: "chin" } }, "ba-counter")
.act("step", { direction: "left", steps: 1, guard: "boxing" })
.registered("jab", {
at: { kind: "person", subject: "bea", region: "abdomen" },
}, "ba-jab3")
.registered("leadUppercut", { at: { kind: "person", subject: "bea", region: "chin" } }, "ba-up")
.registered("rearHook", {
at: { kind: "person", subject: "bea", region: "jawLeft" },
}, "ba-rhook")
.act("guard", { seconds: 1.4, style: "boxing" }, "ba-shell2")
.registered("leanBack", {
from: { kind: "person", subject: "bea", region: "handBackLeft" },
}, "ba-lean2")
.registered("cross", { at: { kind: "person", subject: "bea", region: "chin" } }, "ba-fin1")
.registered("leadHook", {
at: { kind: "person", subject: "bea", region: "jawRight" },
}, "ba-fin2")
.act("step", { direction: "back", steps: 1, guard: "boxing" })
.act("guard", { seconds: 1.5, style: "boxing" });
// bea: body f2, at (0, 1.55) m, facing 180°, trained
const bea = HumanChain.subject("bea")
.act("guard", {
seconds: 1.4,
style: "boxing",
facing: { kind: "person", subject: "ana", region: "face" },
})
.registered("handParry", { against: "ba-jab1" })
.registered("slip", { against: "ba-jab2" })
.registered("swayBack", { against: "ba-cross" })
.registered("elbowBlock", { against: "ba-body" })
.registered("rollUnder", { against: "ba-hook" })
.registered("jab", { at: { kind: "person", subject: "ana", region: "face" } })
.sync({
of: "ba-shell",
event: "set",
offset: 0.2,
align: "impact",
})
.registered("rearHook", {
at: { kind: "person", subject: "ana", region: "jawLeft" },
accuracy: "miss",
})
.sync({ of: "ba-lean", event: "stroke", align: "impact" })
.act("flinch", {
from: { kind: "person", subject: "ana", region: "handBackRight" },
intensity: 0.6,
})
.sync({ of: "ba-counter" })
.registered("elbowBlock", { against: "ba-jab3" })
.registered("cover", { against: "ba-up" })
.registered("rollUnder", { against: "ba-rhook" })
.registered("jab", { at: { kind: "person", subject: "ana", region: "face" } })
.sync({
of: "ba-shell2",
event: "set",
offset: 0.1,
align: "impact",
})
.registered("cross", { at: { kind: "person", subject: "ana", region: "chin" } })
.sync({
of: "ba-shell2",
event: "set",
offset: 0.55,
align: "impact",
})
.registered("leadHook", {
at: { kind: "person", subject: "ana", region: "jawRight" },
accuracy: "miss",
})
.sync({ of: "ba-lean2", event: "stroke", align: "impact" })
.registered("cover", { against: "ba-fin1" })
.registered("cover", { against: "ba-fin2" })
.act("step", { direction: "back", steps: 1, guard: "boxing" })
.act("guard", { seconds: 1.5, style: "boxing" });
const scene = ana.with(bea);
// The lexicon's laws this scene's rows perform, registered with the performance.
const laws = [HumanStrike.jab, HumanStrike.cross, HumanStrike.leadHook, HumanStageFight.leanBack, HumanStrike.leadUppercut, HumanStrike.rearHook, HumanDefence.handParry, HumanDefence.slip, HumanDefence.swayBack, HumanDefence.elbowBlock, HumanDefence.rollUnder, HumanDefence.cover];
// Each body id's motion body, prepared from the site's measures.
declare const bodies: Record<string, IAutoMovieMotionHumanBody>;
const input: IAutoMovieMotionHumanPerformance.IInput = {
seed: "boxing-counters",
performers: [
{ subject: "ana", body: bodies["f1"]!, at: { x: 0, y: 0, z: 0 }, yaw: 0, proficiency: { level: "trained" } },
{ subject: "bea", body: bodies["f2"]!, at: { x: 0, y: 0, z: 1.55 }, yaw: 180, proficiency: { level: "trained" } },
],
composition: scene.node,
laws,
};
const performance = new HumanPerformance(input);Each person's actions on the film clock, with their named instants, as the engine placed them.
The timeline appears when the take is drawn.
The same composition in 4 takes on the player's clock. Each changes one choice and keeps the rest; the other takes are computed in this page, which takes a few seconds.