Skip to Content

Sparring

Two kickboxers trade punches and kicks with parries, checks and counters, then circle off.

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, HumanPerformance, HumanStageFight } from "@automovie/motions";

// red: body m1, at (0, 0) m, facing 0°, trained
const red = HumanChain.subject("red")
  .act("guard", {
      seconds: 0.8,
      facing: { kind: "person", subject: "blue", region: "face" },
    })
  .act("step", { direction: "forward", steps: 1 })
  .act("punch", {
      technique: "straight",
      hand: "lead",
      at: { kind: "person", subject: "blue", region: "face" },
    }, "jab")
  .act("punch", {
      technique: "straight",
      hand: "rear",
      at: { kind: "person", subject: "blue", region: "chin" },
    }, "cross")
  .act("kick", {
      technique: "round",
      leg: "rear",
      at: { kind: "person", subject: "blue", region: "ribsLeft" },
    }, "body")
  .act("guard", {
      seconds: 1.4,
      facing: { kind: "person", subject: "blue", region: "face" },
    }, "shell")
  .act("step", { direction: "left", steps: 1 })
  .act("punch", {
      technique: "straight",
      hand: "lead",
      at: { kind: "person", subject: "blue", region: "face" },
      feint: 0.5,
    })
  .act("kick", {
      technique: "round",
      leg: "rear",
      at: {
        kind: "person",
        subject: "blue",
        region: "thighOuterLeft",
      },
    }, "low")
  .act("punch", {
      technique: "hook",
      hand: "lead",
      at: { kind: "person", subject: "blue", region: "jawRight" },
    }, "hook")
  .act("punch", {
      technique: "uppercut",
      hand: "rear",
      at: { kind: "person", subject: "blue", region: "chin" },
    }, "upper")
  .act("clinch", { partner: "blue", hold: 0.3 })
  .act("knee", {
      at: { kind: "person", subject: "blue", region: "abdomen" },
    }, "knee")
  .act("guard", {
      seconds: 1,
      facing: { kind: "person", subject: "blue", region: "face" },
    })
  .registered("pushed", {
      from: { kind: "person", subject: "blue", region: "soleRight" },
    }, "teeped")
  .act("step", { direction: "back", steps: 1 })
  .act("step", { direction: "right", steps: 2 })
  .act("guard", {
      seconds: 1,
      facing: { kind: "person", subject: "blue", region: "face" },
    });

// blue: body m2, at (0, 1.9) m, facing 180°, trained
const blue = HumanChain.subject("blue")
  .act("guard", {
      seconds: 1.2,
      facing: { kind: "person", subject: "red", region: "face" },
    })
  .act("defend", { kind: "parry", against: "jab" })
  .act("defend", { kind: "slip", against: "cross" })
  .act("defend", { kind: "elbowBlock", against: "body" })
  .act("punch", {
      technique: "straight",
      hand: "rear",
      at: { kind: "person", subject: "red", region: "face" },
    })
  .sync({ of: "shell", event: "set", offset: 0.2, align: "impact" })
  .act("punch", {
      technique: "hook",
      hand: "lead",
      at: { kind: "person", subject: "red", region: "jawRight" },
    })
  .sync({ of: "shell", event: "set", offset: 0.75, align: "impact" })
  .act("step", { direction: "right", steps: 1 })
  .act("defend", { kind: "check", against: "low" })
  .act("defend", { kind: "roll", against: "hook" })
  .act("defend", { kind: "cover", against: "upper" })
  .act("defend", { kind: "check", against: "knee" })
  .act("step", { direction: "back", steps: 1 })
  .act("kick", {
      technique: "push",
      leg: "lead",
      at: { kind: "person", subject: "red", region: "abdomen" },
    })
  .sync({ of: "teeped", event: "start", align: "impact" })
  .act("step", { direction: "left", steps: 2 })
  .act("guard", {
      seconds: 1,
      facing: { kind: "person", subject: "red", region: "face" },
    });

const scene = red.with(blue);

// The lexicon's laws this scene's rows perform, registered with the performance.
const laws = [HumanStageFight.pushed];

// Each body id's motion body, prepared from the site's measures.
declare const bodies: Record<string, IAutoMovieMotionHumanBody>;

const input: IAutoMovieMotionHumanPerformance.IInput = {
  seed: "sparring",
  performers: [
    { subject: "red", body: bodies["m1"]!, at: { x: 0, y: 0, z: 0 }, yaw: 0, proficiency: { level: "trained" } },
    { subject: "blue", body: bodies["m2"]!, at: { x: 0, y: 0, z: 1.9 }, yaw: 180, proficiency: { level: "trained" } },
  ],
  composition: scene.node,
  laws,
};
const performance = new HumanPerformance(input);