spriterrific 0.9.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. spriterrific-0.9.0/LICENSE +21 -0
  2. spriterrific-0.9.0/PKG-INFO +488 -0
  3. spriterrific-0.9.0/README.md +462 -0
  4. spriterrific-0.9.0/pyproject.toml +58 -0
  5. spriterrific-0.9.0/setup.cfg +4 -0
  6. spriterrific-0.9.0/src/spriterrific/__init__.py +5 -0
  7. spriterrific-0.9.0/src/spriterrific/action_batch.py +103 -0
  8. spriterrific-0.9.0/src/spriterrific/anchor_wizard.py +1700 -0
  9. spriterrific-0.9.0/src/spriterrific/anchor_wizard_gui.py +1022 -0
  10. spriterrific-0.9.0/src/spriterrific/anchors.py +332 -0
  11. spriterrific-0.9.0/src/spriterrific/api.py +307 -0
  12. spriterrific-0.9.0/src/spriterrific/assets/guides/alternating-1024x1024.png +0 -0
  13. spriterrific-0.9.0/src/spriterrific/bootstrap_anchors.py +489 -0
  14. spriterrific-0.9.0/src/spriterrific/bria.py +154 -0
  15. spriterrific-0.9.0/src/spriterrific/cells.py +39 -0
  16. spriterrific-0.9.0/src/spriterrific/chroma.py +662 -0
  17. spriterrific-0.9.0/src/spriterrific/cli.py +980 -0
  18. spriterrific-0.9.0/src/spriterrific/commands.py +106 -0
  19. spriterrific-0.9.0/src/spriterrific/events.py +22 -0
  20. spriterrific-0.9.0/src/spriterrific/finalize_runtime.py +217 -0
  21. spriterrific-0.9.0/src/spriterrific/frame_aligner.py +611 -0
  22. spriterrific-0.9.0/src/spriterrific/frame_clean.py +147 -0
  23. spriterrific-0.9.0/src/spriterrific/frame_picker.py +869 -0
  24. spriterrific-0.9.0/src/spriterrific/frame_sheet.py +220 -0
  25. spriterrific-0.9.0/src/spriterrific/guides.py +12 -0
  26. spriterrific-0.9.0/src/spriterrific/manifest.py +38 -0
  27. spriterrific-0.9.0/src/spriterrific/media.py +628 -0
  28. spriterrific-0.9.0/src/spriterrific/pack.py +41 -0
  29. spriterrific-0.9.0/src/spriterrific/paths.py +244 -0
  30. spriterrific-0.9.0/src/spriterrific/pipeline.py +1609 -0
  31. spriterrific-0.9.0/src/spriterrific/pixel_snap.py +184 -0
  32. spriterrific-0.9.0/src/spriterrific/post_selection.py +1104 -0
  33. spriterrific-0.9.0/src/spriterrific/preprocess.py +109 -0
  34. spriterrific-0.9.0/src/spriterrific/presets.py +548 -0
  35. spriterrific-0.9.0/src/spriterrific/prompts.py +510 -0
  36. spriterrific-0.9.0/src/spriterrific/review_index.py +301 -0
  37. spriterrific-0.9.0/src/spriterrific/runids.py +14 -0
  38. spriterrific-0.9.0/src/spriterrific/runtime_tools/__init__.py +0 -0
  39. spriterrific-0.9.0/src/spriterrific/runtime_tools/animated_spritesheets/__init__.py +0 -0
  40. spriterrific-0.9.0/src/spriterrific/runtime_tools/animated_spritesheets/scripts/__init__.py +0 -0
  41. spriterrific-0.9.0/src/spriterrific/runtime_tools/animated_spritesheets/scripts/build_contact_sheet.py +81 -0
  42. spriterrific-0.9.0/src/spriterrific/runtime_tools/animated_spritesheets/scripts/build_sequence_gif.py +60 -0
  43. spriterrific-0.9.0/src/spriterrific/runtime_tools/animated_spritesheets/scripts/make_alternating_sheet.py +42 -0
  44. spriterrific-0.9.0/src/spriterrific/runtime_tools/animated_spritesheets/scripts/normalize_frames.py +63 -0
  45. spriterrific-0.9.0/src/spriterrific/runtime_tools/fal_ai_image/__init__.py +0 -0
  46. spriterrific-0.9.0/src/spriterrific/runtime_tools/fal_ai_image/assets/model-presets.json +140 -0
  47. spriterrific-0.9.0/src/spriterrific/runtime_tools/fal_ai_image/scripts/__init__.py +0 -0
  48. spriterrific-0.9.0/src/spriterrific/runtime_tools/fal_ai_image/scripts/_fal_common.py +271 -0
  49. spriterrific-0.9.0/src/spriterrific/runtime_tools/fal_ai_image/scripts/fal_queue_image_run.py +408 -0
  50. spriterrific-0.9.0/src/spriterrific/runtime_tools/fal_ai_video/__init__.py +0 -0
  51. spriterrific-0.9.0/src/spriterrific/runtime_tools/fal_ai_video/assets/model-presets.json +164 -0
  52. spriterrific-0.9.0/src/spriterrific/runtime_tools/fal_ai_video/scripts/__init__.py +0 -0
  53. spriterrific-0.9.0/src/spriterrific/runtime_tools/fal_ai_video/scripts/_fal_common.py +283 -0
  54. spriterrific-0.9.0/src/spriterrific/runtime_tools/fal_ai_video/scripts/fal_queue_video_run.py +410 -0
  55. spriterrific-0.9.0/src/spriterrific/runtime_tools/gamedev_assets/__init__.py +0 -0
  56. spriterrific-0.9.0/src/spriterrific/runtime_tools/gamedev_assets/scripts/__init__.py +0 -0
  57. spriterrific-0.9.0/src/spriterrific/runtime_tools/gamedev_assets/scripts/asset_sprite_baseline.py +187 -0
  58. spriterrific-0.9.0/src/spriterrific/runtime_tools/pixel_snapper/__init__.py +0 -0
  59. spriterrific-0.9.0/src/spriterrific/runtime_tools/pixel_snapper/scripts/__init__.py +0 -0
  60. spriterrific-0.9.0/src/spriterrific/runtime_tools/pixel_snapper/scripts/pixel_snapper.py +483 -0
  61. spriterrific-0.9.0/src/spriterrific/scale.py +83 -0
  62. spriterrific-0.9.0/src/spriterrific/sheet_guides.py +43 -0
  63. spriterrific-0.9.0/src/spriterrific/size_contract.py +374 -0
  64. spriterrific-0.9.0/src/spriterrific/skill_install.py +77 -0
  65. spriterrific-0.9.0/src/spriterrific/skills/spriterrific/SKILL.md +729 -0
  66. spriterrific-0.9.0/src/spriterrific/skills/spriterrific/references/happy-path-prompt-templates.md +299 -0
  67. spriterrific-0.9.0/src/spriterrific/skills/spriterrific/references/image-action-pose-boards.md +102 -0
  68. spriterrific-0.9.0/src/spriterrific/skills/spriterrific/references/seven-step-ai-prompting.md +228 -0
  69. spriterrific-0.9.0/src/spriterrific/sprite_cleanup.py +526 -0
  70. spriterrific-0.9.0/src/spriterrific/validate.py +33 -0
  71. spriterrific-0.9.0/src/spriterrific/web/app.js +217 -0
  72. spriterrific-0.9.0/src/spriterrific/web/index.html +161 -0
  73. spriterrific-0.9.0/src/spriterrific/web/styles.css +367 -0
  74. spriterrific-0.9.0/src/spriterrific.egg-info/PKG-INFO +488 -0
  75. spriterrific-0.9.0/src/spriterrific.egg-info/SOURCES.txt +103 -0
  76. spriterrific-0.9.0/src/spriterrific.egg-info/dependency_links.txt +1 -0
  77. spriterrific-0.9.0/src/spriterrific.egg-info/entry_points.txt +2 -0
  78. spriterrific-0.9.0/src/spriterrific.egg-info/requires.txt +5 -0
  79. spriterrific-0.9.0/src/spriterrific.egg-info/top_level.txt +1 -0
  80. spriterrific-0.9.0/tests/test_anchor_wizard.py +574 -0
  81. spriterrific-0.9.0/tests/test_anchor_wizard_gui.py +119 -0
  82. spriterrific-0.9.0/tests/test_anchors.py +141 -0
  83. spriterrific-0.9.0/tests/test_bootstrap_anchors.py +312 -0
  84. spriterrific-0.9.0/tests/test_bria.py +44 -0
  85. spriterrific-0.9.0/tests/test_cells.py +32 -0
  86. spriterrific-0.9.0/tests/test_chroma.py +95 -0
  87. spriterrific-0.9.0/tests/test_finalize_runtime.py +81 -0
  88. spriterrific-0.9.0/tests/test_frame_aligner.py +106 -0
  89. spriterrific-0.9.0/tests/test_frame_clean.py +42 -0
  90. spriterrific-0.9.0/tests/test_frame_picker.py +123 -0
  91. spriterrific-0.9.0/tests/test_frame_sheet.py +65 -0
  92. spriterrific-0.9.0/tests/test_media.py +181 -0
  93. spriterrific-0.9.0/tests/test_pack_manifest.py +47 -0
  94. spriterrific-0.9.0/tests/test_pipeline.py +1017 -0
  95. spriterrific-0.9.0/tests/test_pixel_snap.py +316 -0
  96. spriterrific-0.9.0/tests/test_post_selection.py +274 -0
  97. spriterrific-0.9.0/tests/test_preprocess.py +36 -0
  98. spriterrific-0.9.0/tests/test_presets.py +215 -0
  99. spriterrific-0.9.0/tests/test_prompts.py +226 -0
  100. spriterrific-0.9.0/tests/test_runids.py +11 -0
  101. spriterrific-0.9.0/tests/test_scale.py +43 -0
  102. spriterrific-0.9.0/tests/test_sheet_guides.py +38 -0
  103. spriterrific-0.9.0/tests/test_size_contract.py +77 -0
  104. spriterrific-0.9.0/tests/test_skill_install.py +67 -0
  105. spriterrific-0.9.0/tests/test_sprite_cleanup.py +126 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Chong-U Lim
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,488 @@
1
+ Metadata-Version: 2.4
2
+ Name: spriterrific
3
+ Version: 0.9.0
4
+ Summary: Constrained Python pipeline for AI-generated pixel animation spritesheets.
5
+ Author: Chong-U Lim
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://spriterrific.com
8
+ Keywords: pixel-art,spritesheet,game-assets,animation,gamedev,ai
9
+ Classifier: Development Status :: 3 - Alpha
10
+ Classifier: Environment :: Console
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Programming Language :: Python :: 3.13
15
+ Classifier: Topic :: Games/Entertainment
16
+ Classifier: Topic :: Multimedia :: Graphics
17
+ Requires-Python: >=3.11
18
+ Description-Content-Type: text/markdown
19
+ License-File: LICENSE
20
+ Requires-Dist: fal-client>=0.7.0
21
+ Requires-Dist: fastapi>=0.115.0
22
+ Requires-Dist: numpy>=1.26
23
+ Requires-Dist: pillow>=11.0.0
24
+ Requires-Dist: uvicorn>=0.30.0
25
+ Dynamic: license-file
26
+
27
+ # Spriterrific
28
+
29
+ Turn a character prompt or reference image into game-ready pixel spritesheets.
30
+
31
+ Spriterrific is a local Python asset pipeline for AI-assisted 2D game characters. It helps you create a clean character anchor, generate animations, recover frames, curate motion, and export spritesheets, GIF previews, and metadata your game can load.
32
+
33
+ [Watch the short promo reel](docs/assets/readme/spriterrific-promo-reel-16x9.mp4) | [Read the Studio guide](docs/studio-readme.md) | [Read the operator guide](docs/operator-guide.md) | [See the changelog](CHANGELOG.md)
34
+
35
+ ![Spriterrific promo storyboard](docs/assets/readme/spriterrific-promo-reel-16x9-contact.png)
36
+
37
+ ## What You Can Make
38
+
39
+ Start with a prompt or image. Choose the animations your game needs. Export clean runtime assets.
40
+
41
+ | Clean pixel character | Running preview | Runtime spritesheet |
42
+ | --- | --- | --- |
43
+ | ![Robin Chute pixel character](docs/assets/readme/robin-front-pixel-snapped.png) | ![Robin Chute run animation](docs/assets/readme/robin-run.gif) | ![Robin Chute run spritesheet](docs/assets/readme/robin-run-spritesheet.png) |
44
+
45
+ More action examples:
46
+
47
+ | Attack | Death | Run |
48
+ | --- | --- | --- |
49
+ | ![Attack animation](docs/assets/readme/robin-attack.gif) | ![Death animation](docs/assets/readme/robin-death.gif) | ![Run animation](docs/assets/readme/robin-run.gif) |
50
+
51
+ ## Why Spriterrific Exists
52
+
53
+ AI models can produce promising game art, but the raw outputs are rarely ready for an engine. Spriterrific adds the missing production steps:
54
+
55
+ - Generate or import a character reference.
56
+ - Distill it into a clean pixel-art anchor when pixel snapping is desired.
57
+ - Generate facings and animations from accepted anchors.
58
+ - Split video or image generations into recoverable frames.
59
+ - Pick frames with timing-aware defaults and align them with local review tools.
60
+ - Pixel snap, clean, normalize, pack, and preview spritesheets.
61
+ - Write run metadata so work can be debugged, resumed, and audited.
62
+
63
+ The goal is not one magic prompt. The goal is a repeatable asset pipeline.
64
+
65
+ ## Current Happy Path
66
+
67
+ 1. Provide a text prompt or reference image.
68
+ 2. Generate a clean front-facing pixel character.
69
+ 3. Generate a side-facing anchor, usually `w` for platformers.
70
+ 4. Choose animations such as `idle`, `attack`, `hurt`, `jump`, `death`, `walk`, `run`, or `crouch`.
71
+ 5. Generate short image or video motion samples.
72
+ 6. Use the frame picker and frame aligner to curate the result.
73
+ 7. Export spritesheets, GIF previews, and metadata for your game.
74
+
75
+ ## Animation Templates
76
+
77
+ Spriterrific keeps the Python engine actions deliberately generic, then lets
78
+ the SDK and Studio expose friendlier project vocabularies.
79
+
80
+ - `platformer` is the default template for side-view game characters. It
81
+ focuses on `idle`, `attack`, `hurt`, `death`, `walk`, `jump`, and `crouch`.
82
+ - `fighting-game` is for brawler/fighter workflows. The SDK/Studio can ask for
83
+ actions such as `light-punch`, `heavy-kick`, `block-high`, `knockdown`, and
84
+ `get-up`, while the engine records the underlying generic motion contract
85
+ such as `light_attack`, `heavy_attack`, `block_high`, or `get_up`.
86
+ - `point-and-click` is for adventure-game characters. It includes
87
+ `idle`, `walk`, `talk`, `interact`, `pick_up`, `use`, `examine`, `give`, and
88
+ `shrug`, with slightly longer defaults for dialogue and object-interaction
89
+ gestures. These adventure verbs are video-first by default. `adventure` is
90
+ accepted as the same template family.
91
+
92
+ Use `--animation-template fighting-game` with SDK/Studio workflows when you
93
+ want fighting-game action names. Use `--preset-profile fighting-game` with the
94
+ raw CLI when you are running the generic engine actions directly.
95
+
96
+ For point-and-click adventure work, use `--animation-template point-and-click`
97
+ or `--preset-profile point-and-click`. The current left-facing adventure
98
+ convention is `--direction sw`, which means front-left three-quarter rather
99
+ than a true platformer side profile.
100
+
101
+ Frame counts are recommendations, not universal laws. In normal CLI/SDK runs,
102
+ unsupported requested counts are coerced to the nearest recommended count and
103
+ recorded in run metadata. Use `--strict-frame-counts` when you want invalid
104
+ counts to fail before a provider call.
105
+
106
+ ## Output Styles
107
+
108
+ Spriterrific supports two practical art targets:
109
+
110
+ - **Pixel-snap / real pixels**: simpler low-bit art that can be recovered onto a real pixel grid. Best when you want editable, palette-controlled retro sprites.
111
+ - **Mixels / high fidelity**: richer AI-generated pixel texture where mixed pixels are acceptable. Best when the game resolution is high enough that strict pixel purity is less important.
112
+
113
+ If you intend to pixel snap, start from a pixel-snapped anchor. This matters even when the final animation comes from image-to-video.
114
+
115
+ Use the default `lobit-v1` candidate style when you want Spriterrific to distill a prompt or image into its opinionated snap-ready low-bit style. If you want richer high-fidelity/mixel game art and do not want the anchor pixel-snapped, use:
116
+
117
+ ```bash
118
+ --candidate-prompt-preset high-fidelity-v1 \
119
+ --no-pixel-snap-anchor
120
+ ```
121
+
122
+ If you already have a reference image whose style must be preserved, use:
123
+
124
+ ```bash
125
+ --source-image path/to/reference.png \
126
+ --candidate-prompt-preset preserve-reference-v1
127
+ ```
128
+
129
+ `preserve-reference-v1` treats the source image as strict visual authority for proportions, palette, line weight, rendering style, silhouette, and outfit cues. Pixel snapping remains a separate choice: pair it with `--pixel-snap-anchor` to snap/clean the reference style, or `--no-pixel-snap-anchor` to keep richer mixels.
130
+
131
+ The high-fidelity and preserve-reference choices also use less low-bit source prompting for prompt-only runs, so the source does not start from strict lobit constraints unless you ask for them.
132
+
133
+ ## Quick Start
134
+
135
+ Try it without installing:
136
+
137
+ ```bash
138
+ uvx spriterrific --help
139
+ ```
140
+
141
+ Or install it as a tool:
142
+
143
+ ```bash
144
+ pipx install spriterrific
145
+ # or
146
+ uv tool install spriterrific
147
+ # or plain pip
148
+ pip install spriterrific
149
+ ```
150
+
151
+ The examples in this README use `uv run spriterrific ...` (running from a source checkout). If you installed via pipx/uv/pip, drop the `uv run` prefix and call `spriterrific ...` directly.
152
+
153
+ Set provider keys in a `.env` file in your working directory (or export them in your shell) when running live generation:
154
+
155
+ ```text
156
+ FAL_KEY=...
157
+ FAL_API_KEY=...
158
+ REMOVE_BG_API_KEY=...
159
+ ```
160
+
161
+ ### Agent skill
162
+
163
+ Spriterrific ships with a bundled agent skill so coding agents (Claude Code, Cursor, Codex) can drive the full anchor/animation workflow for you. Install it into your game project:
164
+
165
+ ```bash
166
+ cd your-game-project
167
+ spriterrific skill install # writes .claude/skills/spriterrific
168
+ spriterrific skill install --target all # also .codex/skills and .agents/skills
169
+ ```
170
+
171
+ Then ask your agent to "use the spriterrific skill" to generate characters and animations.
172
+
173
+ ### From source
174
+
175
+ If you are working from a source checkout, use `uv`:
176
+
177
+ ```bash
178
+ uv sync
179
+ uv run spriterrific --help
180
+ uv run pytest
181
+ ```
182
+
183
+ ## Using Studio
184
+
185
+ If you prefer the local web UI, start with the [Studio guide](docs/studio-readme.md). The short version: anchors define the character/object, camera view, facing, and art style; animations should use an accepted anchor as the reference and describe only the motion.
186
+
187
+ ## Generate A Character Anchor
188
+
189
+ From a prompt:
190
+
191
+ ```bash
192
+ uv run spriterrific bootstrap-anchors \
193
+ --character-id robin-chute \
194
+ --source-prompt "whimsical human-like forest outlaw, full-body neutral pose, readable silhouette, charming but not goofy" \
195
+ --directions w \
196
+ --game-view platformer \
197
+ --anchor-role character \
198
+ --anchor-context "side-scrolling platformer character, true W profile" \
199
+ --k-colors 64 \
200
+ --run-dir runs/robin-chute-bootstrap
201
+ ```
202
+
203
+ From a reference image:
204
+
205
+ ```bash
206
+ uv run spriterrific bootstrap-anchors \
207
+ --character-id robin-chute \
208
+ --source-image path/to/reference.png \
209
+ --directions w \
210
+ --game-view platformer \
211
+ --anchor-role character \
212
+ --anchor-context "side-scrolling platformer character, true W profile" \
213
+ --k-colors 64 \
214
+ --run-dir runs/robin-chute-bootstrap
215
+ ```
216
+
217
+ From a reference image where the source style should not be redesigned:
218
+
219
+ ```bash
220
+ uv run spriterrific bootstrap-anchors \
221
+ --character-id chibi-hero \
222
+ --source-image path/to/chibi-reference.png \
223
+ --candidate-prompt-preset preserve-reference-v1 \
224
+ --directions w \
225
+ --game-view platformer \
226
+ --anchor-role character \
227
+ --anchor-context "side-scrolling platformer character, true W profile" \
228
+ --pixel-snap-anchor \
229
+ --k-colors 64 \
230
+ --run-dir runs/chibi-hero-bootstrap
231
+ ```
232
+
233
+ Review the outputs before generating animations:
234
+
235
+ ```text
236
+ runs/robin-chute-bootstrap/candidate/front/snapped-1024-chroma.png
237
+ runs/robin-chute-bootstrap/candidate/front/anchor-1024-chroma.png
238
+ runs/robin-chute-bootstrap/anchors/w/anchor-snapped-1024-chroma.png
239
+ runs/robin-chute-bootstrap/anchors/w/anchor-1024-chroma.png
240
+ runs/robin-chute-bootstrap/review/bootstrap/index.md
241
+ ```
242
+
243
+ For enemies, turrets, props, or non-platformer camera views, pass explicit `--game-view`, `--anchor-role`, and `--anchor-context`. Do not rely on a generic character prompt when the asset has special anatomy or camera requirements.
244
+
245
+ For Warcraft-like RTS units, use `rts-oblique` instead of plain `top-down`:
246
+
247
+ ```bash
248
+ uv run spriterrific bootstrap-anchors \
249
+ --character-id orc-warrior \
250
+ --source-prompt "orc warrior for a Warcraft-style top-down RTS, pixel art style but not super low fidelity" \
251
+ --directions n,ne,e,se,s,sw,w,nw \
252
+ --game-view rts-oblique \
253
+ --anchor-role enemy \
254
+ --anchor-context "Warcraft-style elevated RTS unit, readable armor, axe, and broad silhouette" \
255
+ --candidate-prompt-preset high-fidelity-v1 \
256
+ --no-pixel-snap-anchor \
257
+ --k-colors 64
258
+ ```
259
+
260
+ `rts-oblique` changes source, candidate, and direction prompts toward an
261
+ elevated oblique RTS unit camera. It also treats the base candidate as a
262
+ compact south-facing unit rather than a straight-on platformer portrait or tall
263
+ character-turnaround sprite. A good RTS-oblique candidate should read as a
264
+ small unit footprint, usually around 35-45% of the canvas height, with visible
265
+ top planes and clear ground contact. Diagonal directions `ne,se,sw,nw` are
266
+ supported for eight-direction anchor sets.
267
+
268
+ `top-down` and `isometric` are available but experimental. Use `top-down` for
269
+ loose overhead / three-quarter overhead sprites, and `isometric` for true
270
+ tactics / diamond-tile experiments. They are less proven than `platformer` and
271
+ `rts-oblique`.
272
+
273
+ For classic point-and-click adventure characters, use `adventure`:
274
+
275
+ ```bash
276
+ uv run spriterrific bootstrap-anchors \
277
+ --character-id hero \
278
+ --source-image hero.png \
279
+ --directions sw \
280
+ --game-view adventure \
281
+ --anchor-role character \
282
+ --candidate-prompt-preset high-fidelity-v1 \
283
+ --no-pixel-snap-anchor
284
+ ```
285
+
286
+ In the adventure profile, `sw` is the left-facing front-three-quarter character
287
+ view. Runtime code can mirror that facing when the character design permits it.
288
+
289
+ ## Generate Still Actions
290
+
291
+ ```bash
292
+ uv run spriterrific run-actions \
293
+ --actions attack,hurt,jump,death \
294
+ --direction w \
295
+ --reference runs/robin-chute-bootstrap/anchors/w/anchor-snapped-1024-chroma.png \
296
+ --run-dir runs/robin-chute-actions \
297
+ --mode image \
298
+ --pose-board-preset hires \
299
+ --frame-prompt-style loose \
300
+ --pixel-snap \
301
+ --pixel-snap-source chroma-layout \
302
+ --k-colors 64
303
+ ```
304
+
305
+ ## Generate Walk Or Run
306
+
307
+ For video-derived motion, short clips usually work better than long cinematic clips. `walk` often needs about two seconds to complete the cycle; many other actions work best around one second when the provider supports it.
308
+
309
+ Video actions now carry timing semantics. Loop actions such as `idle`, `walk`,
310
+ and `run` use a compact cycle-window selection. Transition actions such as
311
+ `jump`, `death`, `knockdown`, and `get_up` sample the full source/range and
312
+ include the final frame so the export does not cut off before the character
313
+ lands, falls, or stands up.
314
+
315
+ ```bash
316
+ uv run spriterrific run \
317
+ --action walk \
318
+ --direction w \
319
+ --mode video \
320
+ --reference runs/robin-chute-bootstrap/anchors/w/anchor-snapped-1024-chroma.png \
321
+ --run-dir runs/robin-chute-walk \
322
+ --video-model grok-imagine-video-i2v
323
+ ```
324
+
325
+ If the walk reads too much like a run, first try a slower runtime export and a
326
+ wider/later loop-selection window:
327
+
328
+ ```bash
329
+ uv run spriterrific run \
330
+ --action walk \
331
+ --direction w \
332
+ --mode video \
333
+ --reference runs/robin-chute-bootstrap/anchors/w/anchor-snapped-1024-chroma.png \
334
+ --run-dir runs/robin-chute-walk-slow \
335
+ --video-model grok-imagine-video-i2v \
336
+ --video-duration 3 \
337
+ --action-context "slow relaxed walk, upright torso, no sprint lean, one foot near-planted" \
338
+ --fps 7 \
339
+ --cycle-start-fraction 0.2 \
340
+ --cycle-span-factor 6
341
+ ```
342
+
343
+ For exact control, use `--selected-range START:END_EXCLUSIVE` or
344
+ `--selected-order frame-0002.png,...` with `--existing-video`.
345
+
346
+ For denser fighting-game exports, keep the same pipeline but choose the
347
+ profile/actions that describe the motion. Use `get_up` directly instead of
348
+ mapping it to `jump`; get-up starts grounded and ends standing/guarded, while
349
+ jump is a takeoff-to-land transition.
350
+
351
+ For transitions with a known final pose, pass an explicit end reference. For
352
+ example, `get_up` can start from the final knockdown frame and end at the
353
+ standing directional anchor. Spriterrific will use WAN 2.7 when no video model
354
+ is specified, because it supports first+last-frame video.
355
+
356
+ ```bash
357
+ uv run spriterrific run \
358
+ --action get_up \
359
+ --direction w \
360
+ --mode video \
361
+ --preset-profile fighting-game \
362
+ --reference runs/fighter-knockdown-w/final-frame-1024.png \
363
+ --end-reference runs/fighter-bootstrap/anchors/w/anchor-snapped-1024-chroma.png \
364
+ --run-dir runs/fighter-get-up-w
365
+ ```
366
+
367
+ ```bash
368
+ uv run spriterrific run \
369
+ --action heavy_attack \
370
+ --direction w \
371
+ --mode video \
372
+ --animation-template fighting-game \
373
+ --preset-profile fighting-game \
374
+ --frames 12 \
375
+ --reference runs/robin-chute-bootstrap/anchors/w/anchor-snapped-1024-chroma.png \
376
+ --run-dir runs/fighter-heavy-attack-w
377
+ ```
378
+
379
+ Then curate frames:
380
+
381
+ ```bash
382
+ uv run spriterrific frame-picker \
383
+ --run-dir runs/robin-chute-walk \
384
+ --frames 8 \
385
+ --action walk \
386
+ --direction w \
387
+ --reference runs/robin-chute-bootstrap/anchors/w/anchor-snapped-1024-chroma.png
388
+ ```
389
+
390
+ Process the selected frames:
391
+
392
+ ```bash
393
+ uv run spriterrific process-selection \
394
+ --picker-dir runs/robin-chute-walk/frame-picker/<picker-run> \
395
+ --out-dir runs/robin-chute-walk/post-selection/walk-pixel-snap \
396
+ --action walk \
397
+ --direction w \
398
+ --columns 5 \
399
+ --fps 10 \
400
+ --preserve-motion \
401
+ --pixel-snap \
402
+ --k-colors 64
403
+ ```
404
+
405
+ Finalize before copying assets into your game:
406
+
407
+ ```bash
408
+ uv run spriterrific finalize-runtime \
409
+ --input-dir runs/robin-chute-walk/post-selection/walk-pixel-snap \
410
+ --output-dir runs/robin-chute-walk/final
411
+ ```
412
+
413
+ For video/I2V runs, treat fresh preview exports as review-only. A game-ready manifest should include:
414
+
415
+ ```json
416
+ {
417
+ "publicAssetReady": true
418
+ }
419
+ ```
420
+
421
+ Video runs default to preserve-canvas recovery so stable image-to-video frames
422
+ do not get cropped and recentered per frame. The cleanup path keys the
423
+ configured chroma background to transparent black and writes
424
+ `export/preserve-canvas.json` for audit. The default matte is chroma green
425
+ `#00FF00`, but green characters should use a safer matte such as magenta:
426
+
427
+ ```bash
428
+ uv run spriterrific run \
429
+ --action attack \
430
+ --direction w \
431
+ --mode video \
432
+ --reference runs/orc/anchors/w/anchor-snapped-1024-chroma.png \
433
+ --run-dir runs/orc-attack-w \
434
+ --chroma "#FF00FF"
435
+ ```
436
+
437
+ Use the same `--chroma` value for anchor bootstrap, action generation, and
438
+ post-selection processing so prompts, cleanup, metadata, and review pages agree.
439
+ Green-fringe cleanup only runs for green mattes, only before runtime scaling,
440
+ and records warnings when too many green pixels are removed. Use
441
+ `--no-green-fringe-cleanup` if a green-keyed character has important green
442
+ foreground detail.
443
+
444
+ Provider seeds can be passed through for supported models:
445
+
446
+ ```bash
447
+ uv run spriterrific run ... --seed 1234
448
+ uv run spriterrific bootstrap-anchors ... --seed 1234
449
+ ```
450
+
451
+ ## Local Tools Included
452
+
453
+ Spriterrific includes local tools for the non-glamorous parts of asset production:
454
+
455
+ - `frame-picker`: choose the best frames from dense video extraction.
456
+ - `frame-aligner`: nudge runtime frames so the character does not pop around.
457
+ - `sprite-cleanup`: pencil, eraser, and dropper cleanup for final sheets or frames.
458
+ - `size-contract`: keep later animations consistent with an accepted runtime size.
459
+ - `accept-anchor`: promote a reviewed/manual anchor into the canonical run metadata.
460
+
461
+ ## Using Spriterrific Beside A Game
462
+
463
+ Use Spriterrific like an asset workstation, not as code embedded inside your game:
464
+
465
+ ```text
466
+ ~/projects/
467
+ my-game/
468
+ spriterrific-public/
469
+ ```
470
+
471
+ Generate and review assets inside `spriterrific-public/runs/`, then copy only accepted final exports into your game:
472
+
473
+ ```text
474
+ my-game/assets/characters/robin-chute/
475
+ animations/
476
+ run/
477
+ spritesheet.png
478
+ manifest.json
479
+ preview.gif
480
+ ```
481
+
482
+ Keep the run folder as your audit/debug workspace.
483
+
484
+ ## Status
485
+
486
+ Spriterrific is alpha software. It is useful today, but it still expects human review at the important gates: anchor choice, frame selection, alignment, and final promotion.
487
+
488
+ The first supported posture is local CLI usage. API and web surfaces exist for experimentation, but the CLI and Python tools are the clearest path for real asset work right now.