Skip to Content

Schoolyard games

Two pairs at break, one game after the other: first one pair plays rock, paper, scissors on a shared count, then the other clasps hands for a thumb war.

The packages refuse this scene today, in their own words on the view below. #3552 fixes it.

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

// kas: body f1, at (-1, 0) m, facing 0°, trained
const kas = HumanChain.subject("kas")
  .act("stand", { seconds: 0.5 });

// lin: body m1, at (-1, 0.8) m, facing 180°, trained
const lin = HumanChain.subject("lin")
  .act("stand", { seconds: 0.5 });

// mia: body f2, at (1, 0) m, facing 0°, trained
const mia = HumanChain.subject("mia")
  .act("stand", { seconds: 0.5 });

// ned: body m2, at (1, 0.95) m, facing 180°, trained
const ned = HumanChain.subject("ned")
  .act("stand", { seconds: 0.5 });

const scene = kas.with(lin, mia, ned).next(
  HumanChain.mutual(
    HumanSocial.rockPaperScissors,
    { one: HumanChain.subject("kas"), other: HumanChain.subject("lin") },
    {},
  ),
  HumanChain.mutual(
    HumanSocial.thumbWrestle,
    { one: HumanChain.subject("mia"), other: HumanChain.subject("ned") },
    {},
  ),
);

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

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

const input: IAutoMovieMotionHumanPerformance.IInput = {
  seed: "schoolyard-games",
  performers: [
    { subject: "kas", body: bodies["f1"]!, at: { x: -1, y: 0, z: 0 }, yaw: 0, proficiency: { level: "trained" } },
    { subject: "lin", body: bodies["m1"]!, at: { x: -1, y: 0, z: 0.8 }, yaw: 180, proficiency: { level: "trained" } },
    { subject: "mia", body: bodies["f2"]!, at: { x: 1, y: 0, z: 0 }, yaw: 0, proficiency: { level: "trained" } },
    { subject: "ned", body: bodies["m2"]!, at: { x: 1, y: 0, z: 0.95 }, yaw: 180, proficiency: { level: "trained" } },
  ],
  composition: scene.node,
  laws,
};
const performance = new HumanPerformance(input);