Generate clean 2D game sprites & animation atlases — component-row pipeline: state rows, alpha cleanup, frame extraction, runtime atlases. Codex/Claude skill.
release: v2.24.0
Soohong Kime1f97c310ccd
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 1de70f8..0e9d600 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -2,13 +2,18 @@All notable public changes to `sprite-gen` are recorded here. Versions track the `version:` field in `SKILL.md` and `pyproject.toml`.-## Unreleased (v2.24.0) - A walk filmed from its first frame loops at one size, a frame scaled up keeps its crown, and a soft part can follow the body+## v2.24.0 - A walk filmed from its first frame loops at one size, a frame scaled up keeps its crown, and a soft part can follow the body- **Output change: a walk or run loop whose clip changes size by 1 % or more is cut differently.** `video-loop --anchor motion-auto` now holds the clip at its first frame's size before the cycle search (`--size-hold auto`, the default; `size_hold` in the report): the subject's fitted height over the clip is measured (`gait_fallback.scale_drift`) and, at 1 % or more (`SIZE_HOLD_MIN`), every frame is scaled back to the first frame's height about its fitted foot point (`undo_scale`). Until now that ran only in the gait fallback, after the search had failed and at 3 % or more, so a clip that grew 1–3 % and still looped was cut on frames of changing size: the frame one cycle on was larger than the first, and the loop popped at the wrap. A clip under 1 % is cut exactly as before; `--size-hold off` gives the old cut. A clip that grows 2.5 % now loops at its size where it found no cycle before (`tests/video/test_gait_fallback.py`); a front catwalk filmed from its first frame (+2.0 %) went from a seam ratio of 1.44 to 1.19. [docs/video-pipeline.md](docs/video-pipeline.md#4-loop--period-first-seam-second-then-the-gait-floor).- **Fix: scaling a frame back up cut off what it carried past the frame's edge.** A clip that shrinks is scaled up about its feet; when the feet also rose in the frame (a back walk going away), the crown landed above the frame and was cut in every frame it reached. Frames are now widened by the room the furthest one needs (`gait_fallback.undo_padding`, the same for every frame, `padding_ltrb` in `size_hold` and `gait_fallback`), so nothing is lost; a clip that needs no room keeps its frame size and bytes.- **New `sprite-gen video-follow`**: a soft part of a looping body (a chest, a belly, a pouch on a strap) follows the body's motion. An ellipse in the strip's first cell (`--region cx,cy,rx,ry`, repeatable) is moved as a damped mass on the body's own bob — the crown's row and the head's middle read off the cells, the periodic steady state of x'' + 2ζωx' + ω²x = −body'' per harmonic of the cycle (`--freq` 2.4 Hz, `--zeta` 0.6, `--gain` 2.5 times the physical answer) — so it lags and settles with no kick, and the last frame leads into the first. Only the region's pixels change; a move that would fold it over is refused. The strip, GIF and WebP are rewritten and checked, `follow` is recorded in the strip meta, and the strip as it was is kept as `follow.source.png`, so a second run never moves a moved strip. The region is the caller's to give: the engine does not find it. [docs/video-pipeline.md](docs/video-pipeline.md#6-follow-through--video-follow).- **`video-cycle-align` clears a follow-through**: it rebuilds the strip from the cut, so it removes `follow.source.png` and the `follow` record and says `follow_cleared` in the loop's row; a new `video-loop` cut removes them too. Run `video-follow` after the alignment.+| Before / after | |+|---|---|+| A back walk going away, scaled back up: 2.23.0 cut the crown at the cell's top (red line); 2.24.0 widens the frames first |  |+| `video-follow` on a hip pouch (zoomed): as cut, and following the walk's bob as a damped mass |  |+## v2.23.0 - A walking side view shows the far wrist's item each time that arm swings forward; without `--handed` every prompt is 2.22.0's- **Without `--handed`, every prompt is 2.22.0's, byte for byte.** Clips (built-in or `--motion`, every model and pin), `video-prompt`, stills (view, facing, reference, key line, layout guide, the `--facing-fix regen` regeneration), `video --direction side` and the mid-step redraw send what 2.22.0 sent. `tests/gen/test_prompt_freeze.py` holds every prompt string in that table to `tests/fixtures/prompts-v2.22.0.json.gz`, drawn from the 2.22.0 tag's source. The engine's pieces go on through one place (`sprite_gen/gen/prompt_parts.py`, `Prompt.add`), which puts them on as 2.22.0 did; with `--handed` the prompt is that same prompt with the handed sentences put in, and nothing else changes. [docs/prompt-assembly.md](docs/prompt-assembly.md) lists the faults of the 2.22.0 prompts kept until a before-and-after comparison says to change them.diff --git a/SKILL.md b/SKILL.mdindex 15041a3..a91f71b 100644--- a/SKILL.md+++ b/SKILL.md@@ -1,6 +1,6 @@---name: sprite-gen-version: 2.23.0+version: 2.24.0description: "Generates images and game sprites through GPT or Grok with guided provider choices, separate saved defaults, automatic cleanup and optional curation. Handles sprite requests, ordinary image generation/editing, standalone image-to-video clips (i2v, animate this still, 그록 영상, 이매진 비디오, 스틸 움직여줘, first/last frame, reference-to-video, 영상 이어붙이기, 영상 편집, extend/edit a clip), clips from a video MCP on the agent (ZCRE, 지크 MCP), chroma removal, animation atlases, video loops, 큐레이션뷰, image candidates, 팔레트 스왑, palette swap, recolor, rig layers, engine exports, repeating backgrounds, projected shadows, motion/contact inspection and optional scene composition from existing assets."license: Apache-2.0depends_on:diff --git a/pyproject.toml b/pyproject.tomlindex 428eb88..a6fd543 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -12,7 +12,7 @@ build-backend = "setuptools.build_meta"name = "sprite-gen"# Release discipline: keep this package metadata version synchronized with# SKILL.md's `version:` field in the same release commit.-version = "2.23.0"+version = "2.24.0"description = "Component-row pipeline for clean 2D game sprites and animation atlases"readme = "README.md"license = "Apache-2.0"