Skip to content
OpenAgentSkill
Browsing is open · Catalog captured 2026-11-21 · Automatic updates and account services are paused.
Video & audio

h3-game-sprites

Build 2D game sprite sheets by generating motion with MiniMax H3 (Hailuo) video, then cutting the footage into validated chroma-keyed sprite frames - the Mortal Kombat method with a video model instead of filmed actors. Covers the character-still recipe, the idle-pin trick that keeps every move on-model and loopable, per-move clip briefs, frame extraction with keying and numeric QC, seamless walk-cycle detection, and the atlas/render math that keeps a character planted and correctly sized in an engine. Use this whenever the user wants game sprites, a sprite sheet, an animated 2D game character, a fighting/platformer/beat-em-up character, wants to turn AI video into game animation frames, or wants a character animated for a game - even if they never say H3, Hailuo, or "sprite". Also use it for chroma-keying generated video to transparent frames, choosing keyframes from footage, and debugging sprites that jitter, float, sink, or change size between animations.

gary149 · AI review on file

Installation

Read the source and dependencies before running a command. Copying does not install or execute anything.

npx skills add gary149/h3-game-sprites --skill h3-game-sprites

About this skill


name: h3-game-sprites description: Build 2D game sprite sheets by generating motion with MiniMax H3 (Hailuo) video, then cutting the footage into validated chroma-keyed sprite frames - the Mortal Kombat method with a video model instead of filmed actors. Covers the character-still recipe, the idle-pin trick that keeps every move on-model and loopable, per-move clip briefs, frame extraction with keying and numeric QC, seamless walk-cycle detection, and the atlas/render math that keeps a character planted and correctly sized in an engine. Use this whenever the user wants game sprites, a sprite sheet, an animated 2D game character, a fighting/platformer/beat-em-up character, wants to turn AI video into game animation frames, or wants a character animated for a game - even if they never say H3, Hailuo, or "sprite". Also use it for chroma-keying generated video to transparent frames, choosing keyframes from footage, and debugging sprites that jitter, float, sink, or change size between animations. license: MIT compatibility: Requires ffmpeg, Python 3 with Pillow and numpy, and an OPENROUTER_API_KEY with credit for video and image generation.

H3 → Game Sprites

Mortal Kombat filmed actors and digitized the footage into sprites. Do the same with H3 as the actor: one 5 s clip per move (~$0.64), cut down to 8–16 pose extremes, keyed to transparency, validated with numbers rather than vibes.

Read the h3-video skill for H3 API mechanics (submitting, polling, frame pinning, the parallel runner). This skill is the sprite layer on top of it.

Why a 5-second clip becomes a quarter-second move

The video is source footage, not gameplay. 5 s at 24 fps is ~120 frames; a game move needs 8–16. H3's slow, deliberate performance is an advantage — more in-betweens to choose from, less blur per frame. Game timing (startup, active, recovery) is authored separately in frame data and never inherited from the clip.

1. The character still

Generate with scripts/gen_still.py (Nano Banana, ~$0.07, --batch for parallel style probes). The prompt must nail four things:

  • Side view facing right, full body including feet, centered, feet planted on an invisible ground line. Cropped feet make a character you cannot anchor.
  • Flat solid magenta #FF00FF, edge to edge, no gradient, no cast shadow, no ground line. This is your chroma key.
  • Clean cel: no film grain, no dust, no scratches, no paper texture, no vignette. Beautiful grain destroys the key — say so explicitly, because style prompts tend to add it.
  • Bold outlines and flat fills survive downscaling to sprite size.

Style choice is a motion question, not a taste question: some styles H3 simply won't animate. Probe several looks, then spend one clip motion-testing the finalist before committing to a full move set. Ink wash, claymation, rubber-hose and photoreal move well; flat vector and paper cutouts risk freezing.

Extra end-pose stills (KO, downed) are generated from the idle as a reference image. Say "EXACTLY ONE character, completely alone, no second figure, no duplicate" — asking for "knocked out" while showing a standing reference reliably returns both a standing and a lying character in one frame.

2. Clip briefs, one per move

The idle pin. Every move clip sets first_frame = last_frame = the idle still. This buys three things at once: the character cannot drift off-model (H3 keeps identity only when it is anchored in a locked frame), the animation returns exactly to neutral so it loops, and moves chain cleanly in a state machine. Moves that end elsewhere (KO) pin their own end frame instead.

Use the beat structure from h3-video, plus these sprite-specific guards — each one was learned by getting the opposite:

The character's hands and feet stay their normal size at all times - NO
ballooning, NO growing fists; limbs may stretch but hands and feet keep
constant scale.
Camera locked on a tripod, no zoom, no pan, no cut.
The background stays a perfectly flat uniform solid magenta at all times - no
gradient, no cast shadow, no ground line, nothing else enters the frame.
The character stays centered on the same ground level and does not travel
across the frame; everything not described stays static.
Audio: SFX only. NEVER generate music, melody, score or musical tones.
  • Walks are briefed in place ("as if on a treadmill") — the engine moves the transform, so a sprite that travels fights the engine.
  • Hit-stun and KO react to "an invisible blow", since no opponent is in frame.
  • Cartoon models love exaggeration. Unforbidden, fists balloon on impact frames.

A basic set — idle, walk forward, walk back, jump, crouch, punch, kick, block, hit-stun, KO — is ~$6.50 and submits as one parallel batch. Consider skipping the back-walk clip and playing the forward cycle in reverse (a classic 2D fighter trick): asked for a backward stride, H3 tends to give a wary sway.

3. Decompose and validate

python3 scripts/sprite_cut.py clips/v_punch.mp4 sprites/punch --frames 12
python3 scripts/sprite_cut.py clips/v_walk.mp4  sprites/walk  --frames 8 --loop

Writes keyed/*.png (RGBA), strip.png, anim.gif (pose preview at source pacing) and report.json.

Keyframes are picked by cumulative motion arc-length — equal steps of accumulated frame-to-frame change, so frames concentrate where the action is. Uniform sampling looks mushy, and picking local motion maxima over-samples the idle bounce at the head of the clip.

--loop for cycles. Whole-clip picks include the start-up and the settle back to idle, which is exactly why a walk visibly resets instead of looping. Loop mode finds the closest-matching frame pair inside the sustained middle of the clip and samples between them, giving a true seam.

Read the summary before trusting anything:

metricwhat it tells you
worst_bg_purity~1.0 means every pixel is confidently background or character; lower means key
Read the complete source ↗