Game Dev Combat Animation
Meng ToCommunityCreated by Meng To
- Skill
- Workflow
- Design and creative
- MIT
- Low risk
- Has scripts
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides a structured process for developing and refining character combat animations, such as melee strikes and bow shots. It emphasizes a data-driven approach, requiring the definition of a written standard before animation keys are set. The workflow involves designing keys based on anatomical intent, measuring joint ranges and skin deformation on the real skinned mesh, and conducting blind reviews to ensure animations meet specific visual and technical criteria. It includes tools for capturing frames, performing blind A/B comparisons, and verifying critic claims against live-rig data.
What it does
- Defines a standard for combat animation phases, body mechanics, and camera readability.
- Uses scripts to design animation keys based on upper-arm, forearm, and blade directions.
- Enforces joint range and skin deformation limits on the real skinned mesh.
- Facilitates blind A/B testing and critic reviews to evaluate animation quality.
- Provides tools to capture and compose side-by-side video comparisons of animations.
- Verifies critic feedback against full-resolution frames and live-rig numbers.
When to use it
- When creating or reworking character combat animations, including attacks, skills, or move sets.
- When animations exhibit visual issues like stretched, locked, or broken limbs.
- When establishing a formal standard or set of rules for animation testing.
- When scoring animations or aiming to reach specific performance targets.
Advantages
- Reduces visual artifacts like skin wringing or limb locking through strict measurement.
- Ensures consistency across different camera angles and character models.
- Provides an objective, data-backed method for evaluating and improving animations.
- Prevents common animation traps through a documented, repeatable process.
Usage examples
- “I need to create a new heavy sword strike for the knight character.”
- The agent will guide you through defining the move's phases, setting keys based on anatomical intent, and running the required arm and skin checks.
- “The archer's bow draw looks broken; how do I fix it?”
- The agent will help you capture the current animation, compare it against the standard, and use the provided tools to identify and correct the specific joint or path issues.
- “How can I score my current combat animations?”
- The agent will assist in setting up a blind review process with two critics and a blind A/B comparison against the previous release.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/mengto/game-dev-combat-animation/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip game-dev-combat-animation.zip -d .agents/skills
Documentation by Meng To
Game dev: combat animation
Distilled from the Thornvigil knight-and-archer pass (2026-09-30 to 10-01, releases 1.0.71 and 1.0.72). Its outcome:
Arms and hands won 5 of 8 blind A/B comparisons against the previous release.
The archer's broken anchor and the knight's frozen, straight-armed follow-through were fixed.
Seven rounds of fixes came from traps that numbers would have caught earlier. Those traps are listed below.
Read references/thornvigil.md for the project's files, commands and current state, and references/traps.md before changing keys.
The loop
Write the standard before touching keys. Extend
docs/combat-animation-standard.md(or the project's equivalent) with the move's own numbered rules:Phases on the game's clock: anticipation, the contact or release on the rule's frame, recovery.
Body mechanics, weapon path, camera reads.
Mark each rule test (measured) or reviewed (scored from frames).
Ground every rule in a real reference: a Tripo Studio motion-capture preset for body mechanics, or coached technique such as the archery shot cycle. Use Tripo presets only; the user has no Mixamo account and declined Quaternius.
Baseline first. Capture both surfaces (the Characters page and in play), keep the frames, and get blind scores before changing anything.
Design keys from anatomy, not from hand positions. For each key pick the upper-arm direction
u, the forearm directionfand the bladeb, then runkeydesign.mjs. It returns the hand target and flags:raise over 100°;
flex outside 12–140°;
a blade outside 25–115° off the forearm. Hand keys ride the shoulder; blade and elbow keys are world directions. See
references/techniques.md.
Measure before looking. Bake, then:
armcheck.mjsfor joint ranges and the skin's stretch and crush per arm region on the real mesh;at.mjsfor the fist and blade at given times;the move's own probe:
knight-measure.mjs,anchor.mjsordrawfit.mjs. Fix numbers that break a rule before spending a capture.
Test. Run the arm-ranges test and the move's tests. When you add a test for a bug, temporarily restore the bug and prove the test fails; a test that reads the same wrong convention as the code passes forever.
Capture both cameras and look yourself at full resolution. A pose that reads well from the front can read broken from the game camera, and the reverse. Diff each capture against the previous round to be sure it is new.
Judge. Use two blind critics with a fixed rubric (5 criteria × 0–2; the lower score counts) and a blind A/B against the last release with identical sheet titles. Then verify every claim against full-resolution frames and live-rig numbers before acting on it. See
references/review.mdandtemplates/.Ship by the project's rules: tests, build, changelog with real screenshots, push, sizes, publish. Use the
workflow-ship-changeskill. If a pushed but unpublished release regresses, correct it in place with a follow-up commit; don't add a version for something players never saw.Show it. When asked for videos, capture at 30 fps on the move's own clock, place the Characters page and in-play views side by side, and play real speed then quarter speed (
vidcompose.py+encode.swift).
The arm and hand rules
The rig has no twist or corrective bones; past these ranges the skin visibly wrings, crushes or stretches. Every frame of every strike stays inside them, on both bodies, measured on the real skinned mesh.
| Rule | Limit |
|---|---|
| Elbow flexion | 10–152°; the striking or drawing arm keeps ≥20° through the middle 80% of the move |
| Contact reach | sword hand ≥60% of arm length from the shoulder at contact (reach into the blow, never lock) |
| Wrist | bend ≤50°, roll ≤45°; sword wrist capped at 40°; a drawing hand held straight |
| Twist | forearm roll ≤52°, upper-arm roll ≤52° |
| Raise | ≤105° from hanging (shoulder skin crushes beyond); no overhead raises |
| Skin | the worst 1% of each arm or hand region's edges: stretch ≤2×, crush ≤3× against the bind |
| Hands | always in a pose: fist on a grip, hook on a string (set → loose → follow-through), relaxed when empty; never splayed or clawed |
| Paths | hands ride their shoulders and arc about them between keys; blade keys stay reachable (25–115° off the forearm) |
Full rules, with the reasons and the tests that enforce them, are in references/rules.md.
Techniques that worked
Shoulder-relative hands with arc interpolation. A fixed hand target that the lunging trunk drives the shoulder into crushes the arm, and a straight-line lerp folds the elbow shut mid-way.
Aim the forearm, not the wrist. With the wrist capped, the blade lands on the cone the forearm roll allows. To change the blade, change
f.Read blade keys in world space. With the trunk wound back about 70°, "over the sword shoulder" points across behind the head. Tilt the chamber tip-up so it reads as a diagonal.
Keep the follow-through moving.
Quick cut: carry the hand down past the shield-side hip on a bent elbow, with the blade still on the line.
Heavy cut: sink across, then rebound with the elbow folding.
Never hold an arm out at the foe with the blade hanging.
Bow draw. Anchor under the jaw beside the chin, where the hand stays in sight from both cameras. The draw elbow rides 6–8 cm under the arrow. Turn the hips side-on, which fixed draw-shoulder crush better than shrug or elbow poles. Hold the hook through the loose, then send the hand out past the shoulder rather than round the head.
Kinetic chain. Hips lead the chest, and the chest leads the arm. A bow's recoil answers the loose and never leads it.
Traps that each cost a round
references/traps.md has symptom → cause → fix for each. The short list:
Bone axes. The HumGen
headbone is +Y forward and +Z down. Check any bone-local offset against mesh landmarks (face.mjs).Masked failures. The first failing assertion hides every later move in the same test loop, and the first failing gender hides the other.
Camera reads.
A hand by the neck reads as "behind the head" from the game camera.
A blade pointing at the camera reads as "hanging".
An elbow bent in the view plane reads as straight.
Critic misreads. Thumbnails mislead critics. Check full-resolution frames and the live rig before changing anything.
Capture traps.
Never edit
srcwhile a capture runs.After
location.reload(), wait before evaluating the next script.Hand-stepped frames are not FPS measurements.
Report
Lead with what changed in the moves and whether it is live. Then give:
a scores table: before → after, lower of the two critics, per surface;
the A/B result;
the faults still open, named by frame;
the tests added;
file and push sizes.
Say plainly when a score sits short of the target and why.
Files
- ATTRIBUTION.mdAdded by AutoGineer873 B
- LICENSELicence file added by AutoGineer1.0 KiB
- SKILL.md7.8 KiB
- references/review.md3.9 KiB
- references/rules.md7.5 KiB
- references/techniques.md5.6 KiB
- references/thornvigil.md7.1 KiB
- references/traps.md5.1 KiB
- scripts/install.shScript1.2 KiB
- scripts/tools/ab-pack.pyScript1.1 KiB
- scripts/tools/anchor.mjsScript2.3 KiB
- scripts/tools/armcheck.mjsScript7.4 KiB
- scripts/tools/at.mjsScript1.6 KiB
- scripts/tools/baketime.mjsScript1.0 KiB
- scripts/tools/drawfit.mjsScript2.5 KiB
- scripts/tools/encode.swiftScript2.3 KiB
- scripts/tools/face.mjsScript2.0 KiB
- scripts/tools/host.html103 B
- scripts/tools/jumps.mjsScript2.1 KiB
- scripts/tools/keydesign.mjsScript2.2 KiB
- scripts/tools/knight-measure.mjsScript5.2 KiB
- scripts/tools/msheet.pyScript1.1 KiB
- scripts/tools/play.jsScript1.8 KiB
- scripts/tools/psheet.pyScript722 B
- scripts/tools/setup.jsScript2.8 KiB
- scripts/tools/shot.jsScript1.2 KiB
- scripts/tools/vidcompose.pyScript2.3 KiB
- templates/ab-judge-prompt.md1.4 KiB
- templates/critic-prompt.md2.3 KiB
references/thornvigil.md
Thornvigil specifics
Repo: [email protected]:MengTo/thornwake.git; standalone checkout /Users/mengto/Downloads/Projects/thornwake and its worktrees. Follow AGENTS.md:
standing authorization to commit, push and publish;
the 50 MB upload limit, with sizes reported in exact bytes;
a changelog entry with real 2880×1800 screenshots;
provenance recorded in a follow-up commit after publishing.
Publishing to Netlify thornvigil needs the Codex session; this Mac has no Netlify CLI or token.
Where the motion lives
| File | What |
|---|---|
src/player-native/sword-attacks.mjs | Knight/pilgrim strike baker: pilgrimKeys for quick (attack) and heavy (long_hit), QUICK_CUT_FINISH, WRIST_BEND, FOREARM_ROLL, reachFor, arcAbout, kinetic-chain lead |
src/player-native/skill-performances.mjs | Performances: bowShot, bowPower (keys [time, ease, channels]), drawBow(), LOOSES, staff and spell moves |
src/bow-anchor.js | BOW_ANCHOR in the head bone's frame (+X left, +Y forward, +Z down): [-.045, .05, .075], under the jaw beside the chin |
src/player-native/arm-anatomy.mjs | armAnatomy, elbowFlexion, boneTwist, createArmSolver (solve, wrist, present, orient) |
src/player-equipment-grips.js | Finger poses (fist, relaxed, hook); apply({ carry, open, hook }) |
src/player-actor.js | drawHook(): the window in which the drawing hand holds its hook |
src/combat-rules.js | RULES clocks: light 0.3/0.16/0.46, heavy 0.67/0.2/0.7, shoot 0.55/0.04/0.4, powerShot 0.95/0.04/0.55 (startup/active/recovery) |
src/game-player.js | gamePlayerMotion (action time to motion time); the in-game bow string and arrow (stringBow) |
src/player-starter-gear.js | Characters-page bow string and seat |
docs/combat-animation-standard.md | The standard (rules 1–22) |
Tests
These are the files to run after any motion change:
tests/arm-ranges.test.js(rules 15–20; slow, about 2–3 min)tests/bow-shots.test.jstests/knight-strikes.test.jstests/sword-attacks.test.jstests/player-shield-mount.test.jstests/player-arm-anatomy.test.jstests/skill-performances.test.jstests/game-player.test.jstests/archer-skill-vfx.test.jstests/player-idle-action.test.jstests/notebook-classes.test.jstests/player-strike-smear.test.jstests/player-rest-poses.test.jstests/changelog.test.js
The full suite is node --test tests/*.test.js. As of 2026-10-01, 14 asset and props tests fail on main for reasons unrelated to motion (Waystone rasters, creature GLB quantization, props budgets, the camera scale, the troll and others). Compare against that list rather than expecting zero failures.
Tools (scripts/tools/, installed into .dream-loop/moves/)
| Tool | Use |
|---|---|
keydesign.mjs R '[u]' '[f]' '[b]' | Hand target and checks from anatomical intents |
armcheck.mjs <gender> <class:move,...> [trace] | Worst joint ranges and skin stretch/crush per region over every frame; trace prints the R arm per frame |
at.mjs <gender> <clip> <t...> | Fist position and blade direction at motion times (knight clips) |
knight-measure.mjs <gender> [attack,long_hit] | Face (front view) and head gaps, tip height, board pierce, fist behind the board, pelvis turn, tip speed peak |
anchor.mjs <gender> <shoot|powerShot> | Draw hand and elbow per frame in world space and in the head frame, distance to the anchor |
drawfit.mjs | Full-draw elbow height against the arrow, raise, flex, max raise, both shots and both bodies |
face.mjs | Nose, chin, jaw corner, back of the skull and crown in the head bone's frame (from the bound mesh) |
jumps.mjs <gender> <class> <type> [from] [to] | Per-frame joint jumps over 12° in a baked performance clip |
baketime.mjs | Bake cost per performance (prewarm anything over about 100 ms) |
setup.js / play.js / shot.js / host.html | Capture helpers (see review.md) |
msheet.py / psheet.py | Judge sheets |
ab-pack.py | Blind A/B set builder |
vidcompose.py + encode.swift | Side-by-side review videos (AVFoundation; there is no ffmpeg on this Mac) |
Capture setup:
Start the receiver from the checkout:
node scripts/changelog-capture-receiver.mjs .dream-loop/moves 6163.Host page:
http://localhost:5173/.dream-loop/moves/host.html(dev server:preview_start thornwake-dev).Characters page:
/characters.html?wardrobeReview=1&class=<cls>&tab=moves&capture=1&photo=1.In play:
/?review=character&class=<cls>&action=moves&view=side&photo=1&hud=0.
Live-rig snippet (in-play review URL, in-app browser)
for (let i = 0; i < 80 && !(window.game && window.world && window.__stepFrames && document.querySelector('[data-game-move="Idle"]')); i++) await new Promise(r => setTimeout(r, 500));
document.querySelector('[data-game-move="Idle"]').click(); await new Promise(r => setTimeout(r, 1500));
const game = await import('/src/game.js'); window.game.status = 'playing'; window.game.effects = []; window.game.projectiles = [];
const name = o => o.userData?.nativeName || o.name, sets = [];
window.world.scene.traverse(o => { if (o.isBone && name(o) === 'forearm.R') { let top = o; while (top.parent?.isBone) top = top.parent; const find = n => { let r = null; top.traverse(b => { if (!r && b.isBone && name(b) === n) r = b; }); return r; }; sets.push({ s: find('upper_arm.R'), e: o, h: find('hand.R') }); } });
game.startAction(window.game, 'light', window.game.player.angle); window.__stepFrames(1, 1e-4);
const V = o => o.getWorldPosition(new o.position.constructor()), before = sets.map(x => V(x.h));
window.__stepFrames(1, 1 / 30); const moved = sets.map((x, i) => V(x.h).distanceTo(before[i])), set = sets[moved.indexOf(Math.max(...moved))];
const out = []; for (let f = 2; f <= 24; f++) { window.__stepFrames(1, 1 / 30); const s = V(set.s), e = V(set.e), h = V(set.h);
out.push(`${f} flex=${(e.clone().sub(s).angleTo(h.clone().sub(e)) * 57.3).toFixed(0)} reach=${(h.distanceTo(s) * 100).toFixed(0)}cm`); } out.join('\n')State after the pass (2026-10-01)
Releases. 1.0.71 (
ff569df2), 1.0.72 (d721aa07) and its anchor fix (08914d81) are pushed tomain, but not yet published.Final scores, lower of the two critics:
Characters page In play Knight quick 5 6 Knight heavy 6 5 Archer quick 6 6 Archer power 4 6 Faults both critics name, all body and timing rather than arms:
Knight:
The quick strike's wind-up is an upright "salute" raise, not a cocked chamber.
The heavy re-raises to vertical before the strike (a double wind-up).
The buckler forearm reads as a stump (the mount design).
A frozen hold after impact.
The lunge is set before contact.
The buckler drops at the end of the heavy.
Archer:
On the Characters page the chest is square and she swings 90° after the release.
The power shot's aim flips during the raise, and it barely differs from the quick shot.
In play, the hand passes the back of the neck for 1–2 frames after the loose.
These are the next targets toward 8/10.
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs Python, Needs Node.js
Security
What our scanner noticed· Low risk
- Scripts that your agent may run
This skill includes scripts that your agent may run. Read them before you use it.
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Created by
- Meng To
- Publisher
- Meng To (Community)
- Source
- MengTo/Skills · agent-skills/game-combat/game-dev-combat-animation · commit 5ea1661
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Meng To.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download game-dev-combat-animation.zip