Skip to content

notque/vexjoy-agent / skills/game/game-trailer

game-trailer

Verified

Make a trailer, promo, teaser, sizzle reel, launch or gameplay video for one of our browser games (Road to AEW / ROAD TO THE BIG TIME, 5 Star Booker, or any game built the same way) from the real game: frame-exact 4K capture under a virtual clock, a beat-mapped edit with poster overlays printed in the game's own CSS, a score written in code, the game's own sounds and its crowd engine. Use it whenever someone asks for a trailer, a promo or social video of a game, a YouTube or X cut, a re-cut or recapture of an existing trailer, or just 'make a video that shows the game off'. Carries the pace rules the owner settled on and the capture, edit and audio traps that cost time.

FileKindSize
SKILL.mdskill md12.9 KB
references/audio.mdmarkdown9.0 KB
references/capture.mdmarkdown10.9 KB
references/edit.mdmarkdown10.1 KB
references/lessons.mdmarkdown9.4 KB
references/pipeline.mdmarkdown11.1 KB
references/review.mdmarkdown7.7 KB
references/worked-example.mdmarkdown8.5 KB
scripts/beat_levels.pyscript5.7 KB
scripts/edl_table.pyscript6.1 KB
scripts/take_sheet.pyscript4.3 KB

scripts/take_sheet.py

View on GitHub
#!/usr/bin/env python3
"""Contact sheet of a captured take around its marks.

Reads tmp/promo/takes/<take>/take.json (every frame's virtual time, the marks) and the f#####.jpg
frames, and writes one JPEG grid. Two modes:

  marks (default)  one row per mark, the frames at --offsets ms after it; the label on each thumb is
                   "<mark>+<ms>". This is the check before and after a 4K run: did every mark fire,
                   is the move on screen, is a banner or the cursor in the frame.
  uniform          --every ms (with --from/--to) samples the whole take evenly.

Usage:
    python3 take_sheet.py tmp/promo/takes/turn --out tmp/promo/turn.jpg
    python3 take_sheet.py tmp/promo/takes/moneymaker --marks fin_release --offsets 224,304,484,724,1224,2500
    python3 take_sheet.py tmp/promo/takes/table --every 500 --from 9000 --to 16000 --cols 6

Needs Pillow.
"""

from __future__ import annotations

import argparse
import json
import sys
from bisect import bisect_right
from pathlib import Path

from PIL import Image, ImageDraw


def frame_at(frames: list[float], vt: float) -> int:
    i = bisect_right(frames, vt + 1e-6) - 1
    return max(0, min(len(frames) - 1, i))


def main() -> int:
    ap = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
    ap.add_argument("take", type=Path, help="take directory with take.json and f#####.jpg")
    ap.add_argument("--out", type=Path, default=None, help="output JPEG (default: <take>/sheet.jpg)")
    ap.add_argument("--marks", default=None, help="comma list of mark labels (default: every mark)")
    ap.add_argument("--offsets", default="0,100,250,500,1000", help="ms after each mark")
    ap.add_argument("--every", type=float, default=None, help="uniform sampling interval (ms) instead of marks")
    ap.add_argument("--from", dest="t_from", type=float, default=None, help="uniform mode start (ms)")
    ap.add_argument("--to", dest="t_to", type=float, default=None, help="uniform mode end (ms)")
    ap.add_argument("--cols", type=int, default=None, help="columns (default: one row per mark, or 6)")
    ap.add_argument("--width", type=int, default=480, help="thumbnail width (px)")
    ap.add_argument("--quality", type=int, default=88)
    args = ap.parse_args()

    meta = json.loads((args.take / "take.json").read_text(encoding="utf-8"))
    frames: list[float] = meta["frames"]
    marks = {m["label"]: m["vt"] for m in meta.get("marks", [])}

    cells: list[tuple[int, str]] = []
    if args.every:
        t0 = args.t_from if args.t_from is not None else frames[0]
        t1 = args.t_to if args.t_to is not None else frames[-1]
        t = t0
        while t <= t1:
            cells.append((frame_at(frames, t), f"{t / 1000:.2f}s"))
            t += args.every
        cols = args.cols or 6
    else:
        labels = args.marks.split(",") if args.marks else list(marks)
        offsets = [float(o) for o in args.offsets.split(",")]
        missing = [m for m in labels if m not in marks]
        if missing:
            raise SystemExit(f"{args.take}: marks missing from take.json: {', '.join(missing)}")
        for label in labels:
            for off in offsets:
                cells.append((frame_at(frames, marks[label] + off), f"{label}+{off:g}"))
        cols = args.cols or len(offsets)
    if not cells:
        raise SystemExit("nothing to draw")

    first = Image.open(args.take / f"f{cells[0][0]:05d}.jpg")
    tw = args.width
    th = round(first.height * tw / first.width)
    rows = (len(cells) + cols - 1) // cols
    sheet = Image.new("RGB", (cols * tw, rows * th), (0, 0, 0))
    draw = ImageDraw.Draw(sheet)
    for k, (idx, label) in enumerate(cells):
        y, x = divmod(k, cols)
        with Image.open(args.take / f"f{idx:05d}.jpg") as im:
            thumb = im.convert("RGB").resize((tw, th), Image.LANCZOS)
        sheet.paste(thumb, (x * tw, y * th))
        text = f"{label}  f{idx}"
        draw.rectangle((x * tw, y * th, x * tw + 7 * len(text) + 8, y * th + 16), fill=(0, 0, 0))
        draw.text((x * tw + 4, y * th + 2), text, fill=(80, 230, 255))

    out = args.out or (args.take / "sheet.jpg")
    out.parent.mkdir(parents=True, exist_ok=True)
    sheet.save(out, quality=args.quality)
    print(f"{out} ({sheet.width}x{sheet.height}, {len(cells)} frames)")
    return 0


if __name__ == "__main__":
    sys.exit(main())
brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).Stars: 322kUpdated Claude CodeCodexVerifiedInstall
brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).Stars: 198kUpdated Claude CodeCodexVerifiedInstall